Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for lastIndexFunc (0.08 sec)

  1. src/bytes/example_test.go

    	// Output:
    	// 3
    	// 8
    	// -1
    }
    
    func ExampleLastIndexFunc() {
    	fmt.Println(bytes.LastIndexFunc([]byte("go gopher!"), unicode.IsLetter))
    	fmt.Println(bytes.LastIndexFunc([]byte("go gopher!"), unicode.IsPunct))
    	fmt.Println(bytes.LastIndexFunc([]byte("go gopher!"), unicode.IsNumber))
    	// Output:
    	// 8
    	// 9
    	// -1
    }
    
    func ExampleMap() {
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Wed Aug 07 17:22:36 UTC 2024
    - 14.9K bytes
    - Viewed (0)
  2. src/bytes/bytes.go

    func IndexFunc(s []byte, f func(r rune) bool) int {
    	return indexFunc(s, f, true)
    }
    
    // LastIndexFunc interprets s as a sequence of UTF-8-encoded code points.
    // It returns the byte index in s of the last Unicode
    // code point satisfying f(c), or -1 if none do.
    func LastIndexFunc(s []byte, f func(r rune) bool) int {
    	return lastIndexFunc(s, f, true)
    }
    
    // indexFunc is the same as IndexFunc except that if
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Tue Sep 03 20:55:15 UTC 2024
    - 35.6K bytes
    - Viewed (0)
Back to top