- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for ReadSlice (0.14 sec)
-
src/bufio/bufio.go
func (b *Reader) Buffered() int { return b.w - b.r } // ReadSlice reads until the first occurrence of delim in the input, // returning a slice pointing at the bytes in the buffer. // The bytes stop being valid at the next read. // If ReadSlice encounters an error before finding a delimiter, // it returns all the data in the buffer and the error itself (often io.EOF). // ReadSlice fails with error [ErrBufferFull] if the buffer fills without a delim.
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Oct 12 14:39:08 UTC 2023 - 21.8K bytes - Viewed (0) -
src/bytes/buffer.go
func (b *Buffer) ReadBytes(delim byte) (line []byte, err error) { slice, err := b.readSlice(delim) // return a copy of slice. The buffer's backing array may // be overwritten by later calls. line = append(line, slice...) return line, err } // readSlice is like ReadBytes but returns a reference to internal buffer data. func (b *Buffer) readSlice(delim byte) (line []byte, err error) { i := IndexByte(b.buf[b.off:], delim)
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Oct 29 16:47:05 UTC 2024 - 15.7K bytes - Viewed (0) -
cmd/streaming-signature-v4.go
// The returned bytes are owned by the bufio.Reader // so they are only valid until the next bufio read. func readChunkLine(b *bufio.Reader) ([]byte, []byte, error) { buf, err := b.ReadSlice('\n') if err != nil { // We always know when EOF is coming. // If the caller asked for a line, there should be a line. if err == io.EOF { err = io.ErrUnexpectedEOF } else if err == bufio.ErrBufferFull {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu May 16 23:13:47 UTC 2024 - 18.2K bytes - Viewed (0)