MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / String

Method String

pkg/util/base64/base64.go:74–84  ·  view source on GitHub ↗

String flushes any pending output from the encoder and returns the encoded string. The Encoder is reset to its initial state so it can be reused.

()

Source from the content-addressed store, hash-verified

72// String flushes any pending output from the encoder and returns the encoded
73// string. The Encoder is reset to its initial state so it can be reused.
74func (e *Encoder) String() (s string) {
75 // If there's anything left in the buffer, flush it out.
76 if e.nbuf > 0 {
77 e.enc.Encode(e.out[:], e.buf[:e.nbuf])
78 _, _ = e.sb.Write(e.out[:e.enc.EncodedLen(int(e.nbuf))])
79 e.nbuf = 0
80 }
81 s = e.sb.String()
82 e.Init(e.enc)
83 return s
84}

Callers

nothing calls this directly

Calls 4

InitMethod · 0.95
WriteMethod · 0.80
EncodeMethod · 0.65
StringMethod · 0.65

Tested by

no test coverage detected