MCPcopy Create free account
hub / github.com/microsoft/typescript-go / UnquoteString

Function UnquoteString

internal/stringutil/util.go:249–255  ·  view source on GitHub ↗
(str string)

Source from the content-addressed store, hash-verified

247}
248
249func UnquoteString(str string) string {
250 // strconv.Unquote is insufficient as that only handles a single character inside single quotes, as those are character literals in go
251 inner := StripQuotes(str)
252 // In strada we do str.replace(/\\./g, s => s.substring(1)) - which is to say, replace all backslash-something with just something
253 // That's replicated here faithfully, but it seems wrong! This should probably be an actual unquote operation?
254 return matchSlashSomething.ReplaceAllStringFunc(inner, matchSlashReplacer)
255}
256
257func LowerFirstChar(str string) string {
258 char, size := utf8.DecodeRuneInString(str)

Callers 1

Calls 1

StripQuotesFunction · 0.85

Tested by

no test coverage detected