MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / isStringQuoteSafe

Method isStringQuoteSafe

logger/buffer.go:114–121  ·  view source on GitHub ↗

isStringQuoteSafe checks if a string is safe to append without quoting.

(val string)

Source from the content-addressed store, hash-verified

112
113// isStringQuoteSafe checks if a string is safe to append without quoting.
114func (b *buffer) isStringQuoteSafe(val string) bool {
115 for i := range len(val) {
116 if b := val[i]; b >= utf8.RuneSelf || !quoteSafeSet[b] {
117 return false
118 }
119 }
120 return true
121}
122
123// quoteSafeSet is a set of runes that are safe to append without quoting.
124// Some runes here are explicitly marked as unsafe for clarity.

Callers 1

appendStringMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected