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

Method createStringIterator

string.go:111–125  ·  view source on GitHub ↗
(s String)

Source from the content-addressed store, hash-verified

109}
110
111func (r *Runtime) createStringIterator(s String) Value {
112 o := &Object{runtime: r}
113
114 si := &stringIterObject{
115 reader: &lenientUtf16Decoder{utf16Reader: s.utf16Reader()},
116 }
117 si.class = classObject
118 si.val = o
119 si.extensible = true
120 o.self = si
121 si.prototype = r.getStringIteratorPrototype()
122 si.init()
123
124 return o
125}
126
127type stringObject struct {
128 baseObject

Callers 1

stringproto_iteratorMethod · 0.95

Calls 3

utf16ReaderMethod · 0.65
initMethod · 0.65

Tested by

no test coverage detected