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

Function NewFromString

unistring/string.go:59–64  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

57}
58
59func NewFromString(s string) String {
60 if buf := Scan(s); buf != nil {
61 return FromUtf16(buf)
62 }
63 return String(s)
64}
65
66func NewFromRunes(s []rune) String {
67 ascii := true

Callers 14

GetMethod · 0.92
DefineDataPropertyMethod · 0.92
SetMethod · 0.92
DeleteMethod · 0.92
newWrappedFuncMethod · 0.92
toValueMethod · 0.92
toReflectValueMethod · 0.92
SetMethod · 0.92
GetMethod · 0.92
createRegexpGroupsObjMethod · 0.92

Calls 3

ScanFunction · 0.85
FromUtf16Function · 0.85
StringTypeAlias · 0.70

Tested by 1

TestString_AsUtf16Function · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…