MCPcopy Create free account
hub / github.com/cloudwego/netpoll / Until

Method Until

nocopy_linkbuffer.go:364–370  ·  view source on GitHub ↗

Until returns a slice ends with the delim in the buffer.

(delim byte)

Source from the content-addressed store, hash-verified

362
363// Until returns a slice ends with the delim in the buffer.
364func (b *UnsafeLinkBuffer) Until(delim byte) (line []byte, err error) {
365 n := b.indexByte(delim, 0)
366 if n < 0 {
367 return nil, untilErr
368 }
369 return b.Next(n + 1)
370}
371
372// Slice returns a new LinkBuffer, which is a zero-copy slice of this LinkBuffer,
373// and only holds the ability of Reader.

Callers

nothing calls this directly

Calls 2

indexByteMethod · 0.95
NextMethod · 0.95

Tested by

no test coverage detected