String.prototype.charCodeAt ( _pos_ )
- Returns a Number (a nonnegative integer less than 216) that is the code unit value of the string element at index _pos_ within the String resulting from converting this object to a String. If there is no element at that index, the result is *NaN*.
+ Returns a Number (a nonnegative integer less than 216) that is the numeric value of the code unit at index _pos_ within the String resulting from converting this object to a String. If there is no element at that index, the result is *NaN*.
When the `charCodeAt` method is called with one argument _pos_, the following steps are taken:
@@ -28158,7 +28158,7 @@ String.prototype.charCodeAt ( _pos_ )
1. Let _position_ be ? ToInteger(_pos_).
1. Let _size_ be the length of _S_.
1. If _position_ < 0 or _position_ ≥ _size_, return *NaN*.
- 1. Return a value of Number type, whose value is the code unit value of the element at index _position_ within the String _S_.
+ 1. Return a value of Number type, whose value is the numeric value of the code unit at index _position_ within the String _S_.
The `charCodeAt` function is intentionally generic; it does not require that its *this* value be a String object. Therefore it can be transferred to other kinds of objects for use as a method.
@@ -28178,9 +28178,9 @@ String.prototype.codePointAt ( _pos_ )
1. Let _position_ be ? ToInteger(_pos_).
1. Let _size_ be the length of _S_.
1. If _position_ < 0 or _position_ ≥ _size_, return *undefined*.
- 1. Let _first_ be the code unit value of the element at index _position_ within the String _S_.
+ 1. Let _first_ be the numeric value of the code unit at index _position_ within the String _S_.
1. If _first_ < 0xD800 or _first_ > 0xDBFF or _position_+1 = _size_, return _first_.
- 1. Let _second_ be the code unit value of the element at index _position_+1 within the String _S_.
+ 1. Let _second_ be the numeric value of the code unit at index _position_+1 within the String _S_.
1. If _second_ < 0xDC00 or _second_ > 0xDFFF, return _first_.
1. Return UTF16Decode(_first_, _second_).
@@ -28925,10 +28925,10 @@ %StringIteratorPrototype%.next ( )
1. If _position_ ≥ _len_, then
1. Set _O_.[[IteratedString]] to *undefined*.
1. Return CreateIterResultObject(*undefined*, *true*).
- 1. Let _first_ be the code unit value at index _position_ within _s_.
+ 1. Let _first_ be the numeric value of the code unit at index _position_ within _s_.
1. If _first_ < 0xD800 or _first_ > 0xDBFF or _position_+1 = _len_, let _resultString_ be the String value consisting of the single code unit _first_.
1. Else,
- 1. Let _second_ be the code unit value at index _position_+1 within the String _S_.
+ 1. Let _second_ be the numeric value of the code unit at index _position_+1 within the String _S_.
1. If _second_ < 0xDC00 or _second_ > 0xDFFF, let _resultString_ be the String value consisting of the single code unit _first_.
1. Else, let _resultString_ be the string-concatenation of the code unit _first_ and the code unit _second_.
1. Let _resultSize_ be the number of code units in _resultString_.
@@ -29810,7 +29810,7 @@ Runtime Semantics: Canonicalize ( _ch_ )
1. Assert: _u_ is a String value.
1. If _u_ does not consist of a single code unit, return _ch_.
1. Let _cu_ be _u_'s single code unit element.
- 1. If _ch_'s code unit value ≥ 128 and _cu_'s code unit value < 128, return _ch_.
+ 1. If the numeric value of _ch_ ≥ 128 and the numeric value of _cu_ < 128, return _ch_.
1. Return _cu_.
@@ -30502,9 +30502,9 @@ AdvanceStringIndex ( _S_, _index_, _unicode_ )
1. If _unicode_ is *false*, return _index_+1.
1. Let _length_ be the number of code units in _S_.
1. If _index_+1 ≥ _length_, return _index_+1.
- 1. Let _first_ be the code unit value at index _index_ within _S_.
+ 1. Let _first_ be the numeric value of the code unit at index _index_ within _S_.
1. If _first_ < 0xD800 or _first_ > 0xDBFF, return _index_+1.
- 1. Let _second_ be the code unit value at index _index_+1 within _S_.
+ 1. Let _second_ be the numeric value of the code unit at index _index_+1 within _S_.
1. If _second_ < 0xDC00 or _second_ > 0xDFFF, return _index_+1.
1. Return _index_+2.
@@ -35940,10 +35940,10 @@ Runtime Semantics: QuoteJSONString ( _value_ )
1. Set _product_ to the string-concatenation of _product_ and _abbrev_.
- 1. Else if _C_ has a code unit value less than 0x0020 (SPACE), then
+ 1. Else if _C_ has a numeric value less than 0x0020 (SPACE), then
1. Set _product_ to the string-concatenation of _product_ and the code unit 0x005C (REVERSE SOLIDUS).
1. Set _product_ to the string-concatenation of _product_ and `"u"`.
- 1. Let _hex_ be the string result of converting the numeric code unit value of _C_ to a String of four lowercase hexadecimal digits.
+ 1. Let _hex_ be the string result of converting the numeric value of _C_ to a String of four lowercase hexadecimal digits.
1. Set _product_ to the string-concatenation of _product_ and _hex_.
1. Else,
1. Set _product_ to the string-concatenation of _product_ and _C_.