You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// LastIndex returns the index of the last occurrence of v in s, or -1 if not present.funcLastIndex[S~[]E, Ecomparable](sS, vE) int// LastIndexFunc returns the last index i satisfying f(s[i]), or -1 if none do.funcLastIndexFunc[S~[]E, Eany](sS, ffunc(E) bool) int
which parallels the existence of:
strings.IndexXXX
strings.LastIndexXXX
bytes.IndexXXX
bytes.LastIndexXXX
In my use-case, I'm processing Unicode runes as a []rune and wanted to find the last occurrence of a given rune.
mauri870, quarnster, eliben, jimmyfrasche, AndrewHarrisSPU and 21 more