diff --git a/spec.html b/spec.html index c922971..4aeefda 100644 --- a/spec.html +++ b/spec.html @@ -15,7 +15,7 @@

String.prototype [ @@iterator ] ( )

1. Let _O_ be ? RequireObjectCoercible(*this* value). 1. Let _S_ be ? ToString(_O_). - 1. Return CreateStringIterator(_S_, `"char"`). + 1. Return CreateStringIterator(_S_, `"symbol"`).

The value of the `name` property of this function is `"[Symbol.iterator]"`.

@@ -69,7 +69,7 @@

%StringIteratorPrototype%.next ( )

1. Let _len_ be the length of _s_. 1. If _position_ == _len_, then 1. Set _O_.[[IteratedString]] to *undefined*. - 1. If _itemKind_ is `"char"`, let _result_ be *undefined*. + 1. If _itemKind_ is `"symbol"`, let _result_ be *undefined*. 1. Else, 1. Assert: _itemKind_ is `"codePoint"`. 1. Let _result_ be ObjectCreate(%ObjectPrototype%). @@ -86,7 +86,7 @@

%StringIteratorPrototype%.next ( )

1. Else, let _resultString_ be the string-concatenation of the code unit _first_ and the code unit _second_. 1. If _second_ ≥ 0xDC00 and _second_ ≤ 0xDFFF, then 1. Set _O_.[[StringIteratorNextIndex]] to _position_ + 2. - 1. If _itemKind_ is `"char"`, let _result_ be the string-concatenation of the code unit _first_ and the code unit _second_. + 1. If _itemKind_ is `"symbol"`, let _result_ be the string-concatenation of the code unit _first_ and the code unit _second_. 1. Else, 1. Assert: _itemKind_ is `"codePoint"`. 1. Let _resultCp_ be UTF16Decode(_first_, _second_). @@ -97,7 +97,7 @@

%StringIteratorPrototype%.next ( )

1. Let _resultSize_ be the number of code units in _resultString_. 1. Set _O_.[[StringIteratorNextIndex]] to _position_ + _resultSize_. 1. Set _O_.[[StringIteratorNextIndex]] to _position_ + 1. - 1. If _itemKind_ is `"char"`, let _result_ be the String value consisting of the single code unit _first_. + 1. If _itemKind_ is `"symbol"`, let _result_ be the String value consisting of the single code unit _first_. 1. Else, 1. Assert: _itemKind_ is `"codepoint"`. 1. Let _result_ be ObjectCreate(%ObjectPrototype%). @@ -144,7 +144,7 @@

Properties of String Iterator Instances

[[StringIterationKind]] - A String value that identifies what is to be returned for each element of the iteration. The possible values are: `"char"`, `"codePoint"`. + A String value that identifies what is to be returned for each element of the iteration. The possible values are: `"symbol"`, `"codePoint"`.