RFR: 8302590: Add String.indexOf(int ch, int fromIndex, int toIndex)
Roger Riggs
rriggs at openjdk.org
Thu Feb 23 19:07:10 UTC 2023
On Thu, 16 Feb 2023 17:16:35 GMT, Raffaello Giulietti <rgiulietti at openjdk.org> wrote:
> Add an `indexOf()` variant allowing to specify both a lower and an upper bound on the search.
There should be no or little impact from the extra level of calls but its worth confirming.
src/java.base/share/classes/java/lang/String.java line 2462:
> 2460: *
> 2461: * <p>There are no restrictions on the value of {@code fromIndex} and
> 2462: * {@code toIndex}. Negative values have the same effect as it they were zero.
"as it" -> "as if"
-------------
PR: https://git.openjdk.org/jdk/pull/12600
More information about the core-libs-dev
mailing list