RFR: 8302590: Add String.indexOf(int ch, int fromIndex, int toIndex)
Raffaello Giulietti
rgiulietti at openjdk.org
Fri Feb 24 16:41:16 UTC 2023
On Fri, 24 Feb 2023 16:27:10 GMT, Viktor Klang <duke at openjdk.org> wrote:
>> This is the behavior of the underlying implementation as well.
>
> Personally I would expect `string.substring(fromIndex, toIndex).indexOf(ch)` to behave isomorphically to `string.indexOf(ch, fromIndex, toIndex)`
Then you would also expect `string.substring(fromIndex).indexOf(ch)` to behave isomorphically to `string.indexOf(ch, fromIndex)` in current releases, right?
It does not.
-------------
PR: https://git.openjdk.org/jdk/pull/12600
More information about the core-libs-dev
mailing list