VOOZH about

URL: https://www.geeksforgeeks.org/go-language/strings-lastindexfunc-function-in-golang-with-examples/

⇱ strings.LastIndexFunc() Function in Golang With Examples - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

strings.LastIndexFunc() Function in Golang With Examples

Last Updated : 10 May, 2020
strings.LastIndexFunc() Function in Golang returns the index of string s of the last Unicode code point, which satisfies func(c), or it returns -1 if no matches found. Syntax:
func LastIndexFunc(s string, f func(rune) bool) int
Here, s is the string and func() is a function. Return Value: It returns the integer. Example 1: Output:
15
7
Example 2: Output:
12
6
Comment
Article Tags:

Explore