cxfans
11/23/2019 - 2:56 AM

IndexFunc

IndexFunc

package main

import (
	"fmt"
	"strings"
)

func main() {
	fmt.Printf("%d\n", strings.IndexFunc("study golang", func(r rune) bool {
		if r > 'u' {
			return true
		}
		return false
	}))
}