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

Function EscapeQuotes

shell/token.go:225–227  ·  view source on GitHub ↗

EscapeQuotes replaces any " with \"

(str string)

Source from the content-addressed store, hash-verified

223
224// EscapeQuotes replaces any " with \"
225func EscapeQuotes(str string) string {
226 return strings.ReplaceAll(str, `"`, `\"`)
227}
228
229// AddQuotes surrounds given string with quotes,
230// also escaping any contained quotes

Callers 2

PathMethod · 0.85
AddQuotesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected