RFR: 8303648: Add String.indexOf(String str, int beginIndex, int endIndex) [v2]

Roger Riggs rriggs at openjdk.org
Fri Mar 10 21:12:35 UTC 2023


On Fri, 10 Mar 2023 13:35:27 GMT, Raffaello Giulietti <rgiulietti at openjdk.org> wrote:

>> As a followup of [JDK-8302590](https://bugs.openjdk.org/browse/JDK-8302590), this issue covers the analogous case for a search of a string rather than a character.
>
> Raffaello Giulietti has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8303648: Add String.indexOf(String str, int beginIndex, int endIndex)
>   
>   Moved @apiNote on indexOf(String,int) before @param/@return.
>   Rephrased first sentence of indexOf(String,int,int).

Marked as reviewed by rriggs (Reviewer).

src/java.base/share/classes/java/lang/String.java line 2619:

> 2617:      * If stricter behavior is needed, {@link #indexOf(String, int, int)}
> 2618:      * should be considered instead.
> 2619:      * On {@link String}s {@code s} and a non-empty {@code str}, for example,

Is both the normal font "s" and the code font "s" needed.
I reads ok as "On String s and a non-empty str,"...

-------------

PR: https://git.openjdk.org/jdk/pull/12903


More information about the core-libs-dev mailing list