-
Sub-task
-
Resolution: Delivered
-
P4
-
21
Two new methods `indexOf(int ch, int beginIndex, int endIndex)` and `indexOf(String str, int beginIndex, int endIndex)` are added to `java.lang.String` to support forward searches of character `ch`, and of `String` `str`, respectively, and limited to the specified range of indices.
Besides full control on the search range, they are safer to use than `indexOf(int ch, int fromIndex)` and `indexOf(String str, int fromIndex)`, respectively, because they throw an exception on illegal search ranges.
Method `indexOf(int ch, int beginIndex, int endIndex)` is covered byJDK-8302590, and method `indexOf(String str, int beginIndex, int endIndex) is covered by JDK-8303648.
Besides full control on the search range, they are safer to use than `indexOf(int ch, int fromIndex)` and `indexOf(String str, int fromIndex)`, respectively, because they throw an exception on illegal search ranges.
Method `indexOf(int ch, int beginIndex, int endIndex)` is covered by
- relates to
-
JDK-8303648 Add String.indexOf(String str, int beginIndex, int endIndex)
- Resolved