Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelficarra committed Aug 30, 2022
1 parent cb6b625 commit fe4d6d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -33764,10 +33764,10 @@ <h1>String.prototype.lastIndexOf ( _searchString_ [ , _position_ ] )</h1>
1. Assert: If _position_ is *undefined*, then _numPos_ is *NaN*.
1. If _numPos_ is *NaN*, let _pos_ be +&infin;; otherwise, let _pos_ be ! ToIntegerOrInfinity(_numPos_).
1. Let _len_ be the length of _S_.
1. Let _start_ be the result of clamping _pos_ between 0 and _len_.
1. Let _start_ be the result of clamping _pos_ between 0 and _len_ - _searchLen_.
1. If _searchStr_ is the empty String, return 𝔽(_start_).
1. Let _searchLen_ be the length of _searchStr_.
1. For each non-negative integer _i_ such that _start_ &le; _i_ &le; _len_ - _searchLen_, in descending order, do
1. For each integer _i_ such that 0 &le; _i_ &le; _start_, in descending order, do
1. Let _candidate_ be the substring of _S_ from _i_ to _i_ + _searchLen_.
1. If _candidate_ is the same sequence of code units as _searchStr_, return 𝔽(_i_).
1. Return *-1*<sub>𝔽</sub>.
Expand Down

0 comments on commit fe4d6d1

Please sign in to comment.