Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for trimUTF8 (0.17 sec)

  1. src/cmd/internal/test2json/test2json_test.go

    	b := []byte(s)
    	for i := 0; i < len(s); i++ {
    		j := trimUTF8(b[:i])
    		u := string([]rune(s[:j])) + string([]rune(s[j:]))
    		if u != s {
    			t.Errorf("trimUTF8(%q) = %d (-%d), not at boundary (split: %q %q)", s[:i], j, i-j, s[:j], s[j:])
    		}
    		if utf8.FullRune(b[j:i]) {
    			t.Errorf("trimUTF8(%q) = %d (-%d), too early (missed: %q)", s[:j], j, i-j, s[j:i])
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 26 19:50:36 UTC 2022
    - 7.2K bytes
    - Viewed (0)
Back to top