MCPcopy Create free account
hub / github.com/pquerna/ffjson / ReadString

Method ReadString

fflib/v1/buffer.go:399–402  ·  view source on GitHub ↗

ReadString reads until the first occurrence of delim in the input, returning a string containing the data up to and including the delimiter. If ReadString encounters an error before finding a delimiter, it returns the data read before the error and the error itself (often io.EOF). ReadString returns

(delim byte)

Source from the content-addressed store, hash-verified

397// ReadString returns err != nil if and only if the returned data does not end
398// in delim.
399func (b *Buffer) ReadString(delim byte) (line string, err error) {
400 slice, err := b.readSlice(delim)
401 return string(slice), err
402}
403
404// NewBuffer creates and initializes a new Buffer using buf as its initial
405// contents. It is intended to prepare a Buffer to read existing data. It

Callers

nothing calls this directly

Calls 1

readSliceMethod · 0.95

Tested by

no test coverage detected