MCPcopy Create free account
hub / github.com/araddon/qlbridge / IdentityMaybeQuoteStrict

Function IdentityMaybeQuoteStrict

expr/stringutil.go:140–144  ·  view source on GitHub ↗

IdentityMaybeQuoteStrict Quote an identity if need be (has illegal characters or spaces) First character MUST be alpha (not numeric or any other character)

(quote byte, ident string)

Source from the content-addressed store, hash-verified

138// IdentityMaybeQuoteStrict Quote an identity if need be (has illegal characters or spaces)
139// First character MUST be alpha (not numeric or any other character)
140func IdentityMaybeQuoteStrict(quote byte, ident string) string {
141 var buf bytes.Buffer
142 IdentityMaybeQuoteStrictBuf(&buf, quote, ident)
143 return buf.String()
144}
145
146func escapeQuote(buf *bytes.Buffer, quote rune, val string) {
147 last := 0

Callers 1

TestIdentityQuotingFunction · 0.85

Calls 2

StringMethod · 0.65

Tested by 1

TestIdentityQuotingFunction · 0.68