Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for ExampleRuneStart (0.19 sec)

  1. src/unicode/utf8/example_test.go

    	// Output:
    	// bytes = 13
    	// runes = 9
    }
    
    func ExampleRuneLen() {
    	fmt.Println(utf8.RuneLen('a'))
    	fmt.Println(utf8.RuneLen('界'))
    	// Output:
    	// 1
    	// 3
    }
    
    func ExampleRuneStart() {
    	buf := []byte("a界")
    	fmt.Println(utf8.RuneStart(buf[0]))
    	fmt.Println(utf8.RuneStart(buf[1]))
    	fmt.Println(utf8.RuneStart(buf[2]))
    	// Output:
    	// true
    	// true
    	// false
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 05 21:29:18 UTC 2021
    - 3.6K bytes
    - Viewed (0)
Back to top