Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. src/unicode/utf8/example_test.go

    		fmt.Printf("%c %v\n", r, size)
    
    		b = b[:len(b)-size]
    	}
    	// Output:
    	// 界 3
    	// 世 3
    	//   1
    	// , 1
    	// o 1
    	// l 1
    	// l 1
    	// e 1
    	// H 1
    }
    
    func ExampleDecodeLastRuneInString() {
    	str := "Hello, 世界"
    
    	for len(str) > 0 {
    		r, size := utf8.DecodeLastRuneInString(str)
    		fmt.Printf("%c %v\n", r, size)
    
    		str = str[:len(str)-size]
    	}
    	// Output:
    	// 界 3
    	// 世 3
    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