Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for Han (0.24 sec)

  1. src/bytes/example_test.go

    	fmt.Println(bytes.IndexByte([]byte("chicken"), byte('g')))
    	// Output:
    	// 4
    	// -1
    }
    
    func ExampleIndexFunc() {
    	f := func(c rune) bool {
    		return unicode.Is(unicode.Han, c)
    	}
    	fmt.Println(bytes.IndexFunc([]byte("Hello, 世界"), f))
    	fmt.Println(bytes.IndexFunc([]byte("Hello, world"), f))
    	// Output:
    	// 7
    	// -1
    }
    
    func ExampleIndexAny() {
    Go
    - Registered: Tue Apr 16 11:13:10 GMT 2024
    - Last Modified: Mon Mar 04 15:54:40 GMT 2024
    - 15K bytes
    - Viewed (1)
Back to top