This commit is contained in:
Kevin Wan
2020-12-10 15:16:13 +08:00
committed by GitHub
parent 0d7f1d23b4
commit 5071736ab4

View File

@@ -19,10 +19,11 @@ func Untitle(s string) string {
}
func Index(slice []string, item string) int {
for i, _ := range slice {
for i := range slice {
if slice[i] == item {
return i
}
}
return -1
}