From 8410f1b68b81522d3a34753e4ed9be053a162e4b Mon Sep 17 00:00:00 2001 From: Richard Gibson Date: Thu, 3 Nov 2022 23:08:55 -0700 Subject: [PATCH] Editorial: Generalize the note about when StringIndexOf is guaranteed to return -1 (#2950) --- spec.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec.html b/spec.html index 94a9ce00be..7b0c937d1c 100644 --- a/spec.html +++ b/spec.html @@ -1167,7 +1167,7 @@

If _searchValue_ is the empty String and _fromIndex_ is less than or equal to the length of _string_, this algorithm returns _fromIndex_. The empty String is effectively found at every position within a string, including after the last code unit.

-

This algorithm always returns -1 if _fromIndex_ > the length of _string_.

+

This algorithm always returns -1 if _fromIndex_ + the length of _searchValue_ > the length of _string_.