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

Method String

unistring/string.go:102–108  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

100}
101
102func (s String) String() string {
103 if b := s.AsUtf16(); b != nil {
104 return string(utf16.Decode(b[1:]))
105 }
106
107 return string(s)
108}
109
110func (s String) AsUtf16() []uint16 {
111 if len(s) < 4 || len(s)&1 != 0 {

Callers 1

BenchmarkToUTF8StringFunction · 0.95

Implementers 1

importedStringstring_imported.go

Calls 1

AsUtf16Method · 0.95

Tested by 1

BenchmarkToUTF8StringFunction · 0.76