MCPcopy Create free account
hub / github.com/cogentcore/core / RawString

Method RawString

parse/languages/bibtex/bibtex.go:86–102  ·  view source on GitHub ↗

RawString returns a raw (bibtex) representation of the composite string.

()

Source from the content-addressed store, hash-verified

84
85// RawString returns a raw (bibtex) representation of the composite string.
86func (c *BibComposite) RawString() string {
87 var buf bytes.Buffer
88 for i, comp := range *c {
89 if i > 0 {
90 buf.WriteString(" # ")
91 }
92 switch comp := comp.(type) {
93 case *BibConst:
94 buf.WriteString(comp.RawString())
95 case *BibVar:
96 buf.WriteString(comp.RawString())
97 case *BibComposite:
98 buf.WriteString(comp.RawString())
99 }
100 }
101 return buf.String()
102}
103
104// BibEntry is a record of BibTeX record.
105type BibEntry struct {

Callers

nothing calls this directly

Calls 3

StringMethod · 0.95
WriteStringMethod · 0.80
RawStringMethod · 0.65

Tested by

no test coverage detected