MCPcopy Create free account
hub / github.com/dop251/goja / newStringValue

Function newStringValue

string.go:134–139  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

132}
133
134func newStringValue(s string) String {
135 if u := unistring.Scan(s); u != nil {
136 return unicodeString(u)
137 }
138 return asciiString(s)
139}
140
141func stringValueFromRaw(raw unistring.String) String {
142 if b := raw.AsUtf16(); b != nil {

Callers 15

emitGetterMethod · 0.85
emitGetterMethod · 0.85
NewSymbolFunction · 0.85
toUpperMethod · 0.85
nextMethod · 0.85
toUpperMethod · 0.85
TestImportedStringFunction · 0.85
TestValueStringBuilderFunction · 0.85
TestMapHashFunction · 0.85
stringproto_normalizeMethod · 0.85
stringproto_splitMethod · 0.85
stringproto_trimMethod · 0.85

Calls 3

ScanFunction · 0.92
unicodeStringTypeAlias · 0.85
asciiStringTypeAlias · 0.85

Tested by 6

TestImportedStringFunction · 0.68
TestValueStringBuilderFunction · 0.68
TestMapHashFunction · 0.68
TestEscapeInvalidUtf16Function · 0.68
TestDecodeURIFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…