MCPcopy
hub / github.com/golang/tools / String

Method String

internal/pkgbits/encoder.go:322–324  ·  view source on GitHub ↗

String encodes and writes a string value into the element bitstream. Internally, strings are deduplicated by adding them to the strings section (if not already present), and then writing a relocation into the element bitstream.

(s string)

Source from the content-addressed store, hash-verified

320// section (if not already present), and then writing a relocation
321// into the element bitstream.
322func (w *Encoder) String(s string) {
323 w.StringRef(w.p.StringIdx(s))
324}
325
326// StringRef writes a reference to the given index, which must be a
327// previously encoded string value.

Callers 4

StringsMethod · 0.95
scalarMethod · 0.95
bigIntMethod · 0.95
bigFloatMethod · 0.95

Calls 2

StringRefMethod · 0.95
StringIdxMethod · 0.45

Tested by

no test coverage detected