(idx valueInt)
| 186 | } |
| 187 | |
| 188 | func (s *stringObject) getOwnPropIdx(idx valueInt) Value { |
| 189 | i := int64(idx) |
| 190 | if i >= 0 { |
| 191 | if i < int64(s.length) { |
| 192 | val := s._getIdx(int(i)) |
| 193 | return &valueProperty{ |
| 194 | value: val, |
| 195 | enumerable: true, |
| 196 | } |
| 197 | } |
| 198 | return nil |
| 199 | } |
| 200 | |
| 201 | return s.baseObject.getOwnPropStr(idx.string()) |
| 202 | } |
| 203 | |
| 204 | func (s *stringObject) _getIdx(idx int) Value { |
| 205 | return s.value.Substring(idx, idx+1) |
no test coverage detected