MCPcopy Index your code
hub / github.com/dop251/goja / setLength

Method setLength

string.go:153–159  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

151}
152
153func (s *stringObject) setLength() {
154 if s.value != nil {
155 s.length = s.value.Length()
156 }
157 s.lengthProp.value = intToValue(int64(s.length))
158 s._put("length", &s.lengthProp)
159}
160
161func (s *stringObject) getStr(name unistring.String, receiver Value) Value {
162 if i := strToGoIdx(name); i >= 0 && i < s.length {

Callers 1

initMethod · 0.95

Calls 3

intToValueFunction · 0.85
LengthMethod · 0.65
_putMethod · 0.45

Tested by

no test coverage detected