Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for AppendRune (0.12 sec)

  1. src/bytes/buffer.go

    	if uint32(r) < utf8.RuneSelf {
    		b.WriteByte(byte(r))
    		return 1, nil
    	}
    	b.lastRead = opInvalid
    	m, ok := b.tryGrowByReslice(utf8.UTFMax)
    	if !ok {
    		m = b.grow(utf8.UTFMax)
    	}
    	b.buf = utf8.AppendRune(b.buf[:m], r)
    	return len(b.buf) - m, nil
    }
    
    // Read reads the next len(p) bytes from the buffer or until the buffer
    // is drained. The return value n is the number of bytes read. If the
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Tue Oct 29 16:47:05 UTC 2024
    - 15.7K bytes
    - Viewed (0)
  2. src/bytes/bytes.go

    	b := make([]byte, 0, len(s))
    	for i := 0; i < len(s); {
    		wid := 1
    		r := rune(s[i])
    		if r >= utf8.RuneSelf {
    			r, wid = utf8.DecodeRune(s[i:])
    		}
    		r = mapping(r)
    		if r >= 0 {
    			b = utf8.AppendRune(b, r)
    		}
    		i += wid
    	}
    	return b
    }
    
    // Despite being an exported symbol,
    // Repeat is linknamed by widely used packages.
    // Notable members of the hall of shame include:
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Tue Sep 03 20:55:15 UTC 2024
    - 35.6K bytes
    - Viewed (0)
  3. doc/go_spec.html

    The <a href="/pkg/cmd/vet"><code>go vet</code></a> tool flags certain
    integer-to-string conversions as potential errors.
    Library functions such as
    <a href="/pkg/unicode/utf8#AppendRune"><code>utf8.AppendRune</code></a> or
    <a href="/pkg/unicode/utf8#EncodeRune"><code>utf8.EncodeRune</code></a>
    should be used instead.
    </li>
    </ol>
    
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Wed Oct 02 00:58:01 UTC 2024
    - 282.5K bytes
    - Viewed (0)
Back to top