Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. src/bytes/buffer.go

    func NewBuffer(buf []byte) *Buffer { return &Buffer{buf: buf} }
    
    // NewBufferString creates and initializes a new [Buffer] using string s as its
    // initial contents. It is intended to prepare a buffer to read an existing
    // string.
    //
    // In most cases, new([Buffer]) (or just declaring a [Buffer] variable) is
    // sufficient to initialize a [Buffer].
    func NewBufferString(s string) *Buffer {
    	return &Buffer{buf: []byte(s)}
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Tue Oct 29 16:47:05 UTC 2024
    - 15.7K bytes
    - Viewed (0)
Back to top