Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for trimUTF (0.07 sec)

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

    // does not end in the middle of a possibly-valid UTF-8 sequence.
    //
    // If a large text buffer must be split before position i at the latest,
    // splitting at position trimUTF(b[:i]) avoids splitting a UTF-8 sequence.
    func trimUTF8(b []byte) int {
    	// Scan backward to find non-continuation byte.
    	for i := 1; i < utf8.UTFMax && i <= len(b); i++ {
    		if c := b[len(b)-i]; c&0xc0 != 0x80 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 09 17:33:07 UTC 2022
    - 14.5K bytes
    - Viewed (0)
Back to top