Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editorial: update for String{,Last}IndexOf returning not-found #875

Merged
merged 3 commits into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
"homepage": "https://tc39.es/ecma402/",
"dependencies": {
"ecmarkup": "^18.1.2",
"@tc39/ecma262-biblio": "2.1.2678"
"@tc39/ecma262-biblio": "2.1.2719"
}
}
2 changes: 1 addition & 1 deletion spec/locales-currencies-tz.html
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ <h1>
1. If IsSanctionedSingleUnitIdentifier(_unitIdentifier_) is *true*, then
1. Return *true*.
1. Let _i_ be StringIndexOf(_unitIdentifier_, *"-per-"*, 0).
1. If _i_ is -1 or StringIndexOf(_unitIdentifier_, *"-per-"*, _i_ + 1) is not -1, then
1. If _i_ is ~not-found~ or StringIndexOf(_unitIdentifier_, *"-per-"*, _i_ + 1) is not ~not-found~, then
1. Return *false*.
1. Assert: The five-character substring *"-per-"* occurs exactly once in _unitIdentifier_, at index _i_.
1. Let _numerator_ be the substring of _unitIdentifier_ from 0 to _i_.
Expand Down
8 changes: 4 additions & 4 deletions spec/negotiation.html
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ <h1>
1. Let _k_ be 3.
1. Repeat, while _k_ &lt; _size_,
1. Let _e_ be StringIndexOf(_extension_, *"-"*, _k_).
1. If _e_ = -1, let _len_ be _size_ - _k_; else let _len_ be _e_ - _k_.
1. If _e_ is ~not-found~, let _len_ be _size_ - _k_; else let _len_ be _e_ - _k_.
1. Let _subtag_ be the substring of _extension_ from _k_ to _k_ + _len_.
1. NOTE: A <emu-not-ref>keyword</emu-not-ref> is a sequence of subtags in which the first is a key of length 2 and any subsequent ones (if present) have length in the inclusive interval from 3 to 8, collectively constituting a value along with their medial *"-"* separators. An attribute is a single subtag with length in the inclusive interval from 3 to 8 that precedes all <emu-not-ref>keywords</emu-not-ref>.
1. Assert: _len_ &ge; 2.
Expand Down Expand Up @@ -182,7 +182,7 @@ <h1>
<emu-alg>
1. Assert: _locale_ does not contain a Unicode locale extension sequence.
1. Let _privateIndex_ be StringIndexOf(_locale_, *"-x-"*, 0).
1. If _privateIndex_ = -1, then
1. If _privateIndex_ is ~not-found~, then
1. Let _newLocale_ be the string-concatenation of _locale_ and _extension_.
1. Else,
1. Let _preExtension_ be the substring of _locale_ from 0 to _privateIndex_.
Expand Down Expand Up @@ -443,12 +443,12 @@ <h1>
1. Let _result_ be a new empty List.
1. Let _placeholderEnd_ be -1.
1. Let _placeholderStart_ be StringIndexOf(_pattern_, *"{"*, 0).
1. Repeat, while _placeholderEnd_ < _placeholderStart_,
1. Repeat, while _placeholderStart_ is not ~not-found~,
1. Let _literal_ be the substring of _pattern_ from _placeholderEnd_ + 1 to _placeholderStart_.
1. If _literal_ is not the empty String, then
1. Append the Record { [[Type]]: *"literal"*, [[Value]]: _literal_ } to _result_.
1. Set _placeholderEnd_ to StringIndexOf(_pattern_, *"}"*, _placeholderStart_).
1. Assert: _placeholderStart_ < _placeholderEnd_.
1. Assert: _placeholderEnd_ is not ~not-found~ and _placeholderStart_ < _placeholderEnd_.
1. Let _placeholderName_ be the substring of _pattern_ from _placeholderStart_ + 1 to _placeholderEnd_.
1. Append the Record { [[Type]]: _placeholderName_, [[Value]]: *undefined* } to _result_.
1. Set _placeholderStart_ to StringIndexOf(_pattern_, *"{"*, _placeholderEnd_).
Expand Down
4 changes: 2 additions & 2 deletions spec/numberformat.html
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ <h1>
1. Let _string_ be _result_.[[FormattedString]].
1. If _intlObject_.[[TrailingZeroDisplay]] is *"stripIfInteger"* and <emu-eqn>_x_ modulo 1 = 0</emu-eqn>, then
1. Let _i_ be StringIndexOf(_string_, *"."*, 0).
1. If _i_ &ne; -1, set _string_ to the substring of _string_ from 0 to _i_.
1. If _i_ is not ~not-found~, set _string_ to the substring of _string_ from 0 to _i_.
1. Let _int_ be _result_.[[IntegerDigitsCount]].
1. Let _minInteger_ be _intlObject_.[[MinimumIntegerDigits]].
1. If _int_ &lt; _minInteger_, then
Expand Down Expand Up @@ -920,7 +920,7 @@ <h1>
1. Else,
1. Use an implementation dependent algorithm to map _n_ to the appropriate representation of _n_ in the given numbering system.
1. Let _decimalSepIndex_ be StringIndexOf(_n_, *"."*, 0).
1. If _decimalSepIndex_ &gt; 0, then
1. If _decimalSepIndex_ is not ~not-found~ and _decimalSepIndex_ &gt; 0, then
1. Let _integer_ be the substring of _n_ from position 0, inclusive, to position _decimalSepIndex_, exclusive.
1. Let _fraction_ be the substring of _n_ from position _decimalSepIndex_, exclusive, to the end of _n_.
1. Else,
Expand Down
2 changes: 1 addition & 1 deletion spec/pluralrules.html
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ <h1>
1. Let _n_ be ! ToNumber(_s_).
1. Assert: _n_ is finite.
1. Let _dp_ be StringIndexOf(_s_, *"."*, 0).
1. If _dp_ = -1, then
1. If _dp_ is ~not-found~, then
1. Let _intPart_ be _n_.
1. Let _fracSlice_ be *""*.
1. Else,
Expand Down
Loading