Skip to content
This repository was archived by the owner on Sep 2, 2022. It is now read-only.

Commit e4c5446

Browse files
author
Jim Laskey
committed
8268236: The documentation of the String.regionMatches method contains error
Reviewed-by: rriggs, dfuchs
1 parent d9cb068 commit e4c5446

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/java.base/share/classes/java/lang/String.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2169,9 +2169,9 @@ public boolean regionMatches(int toffset, String other, int ooffset, int len) {
21692169
* ignoring case if and only if {@code ignoreCase} is true.
21702170
* The sequences {@code tsequence} and {@code osequence} are compared,
21712171
* where {@code tsequence} is the sequence produced as if by calling
2172-
* {@code this.substring(toffset, len).codePoints()} and {@code osequence}
2173-
* is the sequence produced as if by calling
2174-
* {@code other.substring(ooffset, len).codePoints()}.
2172+
* {@code this.substring(toffset, toffset + len).codePoints()} and
2173+
* {@code osequence} is the sequence produced as if by calling
2174+
* {@code other.substring(ooffset, ooffset + len).codePoints()}.
21752175
* The result is {@code true} if and only if all of the following
21762176
* are true:
21772177
* <ul><li>{@code toffset} is non-negative.

0 commit comments

Comments
 (0)