Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
59
func
NewFromString(s string) String {
60
if
buf := Scan(s); buf != nil {
61
return
FromUtf16(buf)
62
}
63
return
String(s)
64
}
65
66
func
NewFromRunes(s []rune) String {
67
ascii := true
Callers
14
Get
Method · 0.92
DefineDataProperty
Method · 0.92
DefineAccessorProperty
Method · 0.92
Set
Method · 0.92
Delete
Method · 0.92
builtinJSON_decodeObject
Method · 0.92
newWrappedFunc
Method · 0.92
toValue
Method · 0.92
toReflectValue
Method · 0.92
Set
Method · 0.92
Get
Method · 0.92
createRegexpGroupsObj
Method · 0.92
Calls
3
Scan
Function · 0.85
FromUtf16
Function · 0.85
String
TypeAlias · 0.70
Tested by
1
TestString_AsUtf16
Function · 0.68
Used in the wild
real call sites across dependent graphs
searching dependent graphs…