@ -169,3 +169,13 @@ func CheckExists(filePath string, allowDir bool) bool {
}
return true
// SliceIndex -
func SliceIndex(limit int, predicate func(idx int) bool) int {
for i := 0; i < limit; i++ {
if predicate(i) {
return i
return -1
The note is not visible to the blocked user.