Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for writeQString (0.08 sec)

  1. src/bufio/bufio_test.go

    }
    
    func (w *teststringwriter) WriteString(s string) (int, error) {
    	w.writeString += s
    	return len(s), nil
    }
    
    func (w *teststringwriter) check(t *testing.T, write, writeString string) {
    	t.Helper()
    	if w.write != write {
    		t.Errorf("write: expected %q, got %q", write, w.write)
    	}
    	if w.writeString != writeString {
    		t.Errorf("writeString: expected %q, got %q", writeString, w.writeString)
    	}
    }
    
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Fri Nov 01 21:52:12 UTC 2024
    - 51.6K bytes
    - Viewed (0)
  2. src/bytes/buffer.go

    	if !ok {
    		m = b.grow(len(p))
    	}
    	return copy(b.buf[m:], p), nil
    }
    
    // WriteString appends the contents of s to the buffer, growing the buffer as
    // needed. The return value n is the length of s; err is always nil. If the
    // buffer becomes too large, WriteString will panic with [ErrTooLarge].
    func (b *Buffer) WriteString(s string) (n int, err error) {
    	b.lastRead = opInvalid
    	m, ok := b.tryGrowByReslice(len(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