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

Method _getIdx

string.go:204–206  ·  view source on GitHub ↗
(idx int)

Source from the content-addressed store, hash-verified

202}
203
204func (s *stringObject) _getIdx(idx int) Value {
205 return s.value.Substring(idx, idx+1)
206}
207
208func (s *stringObject) setOwnStr(name unistring.String, val Value, throw bool) bool {
209 if i := strToGoIdx(name); i >= 0 && i < s.length {

Callers 4

getStrMethod · 0.95
getIdxMethod · 0.95
getOwnPropStrMethod · 0.95
getOwnPropIdxMethod · 0.95

Calls 1

SubstringMethod · 0.65

Tested by

no test coverage detected