Verify if two regions of strings are identical.
String
|
The regionMatches() method compares segments within two distinct strings to determine if they are identical.
One of the following:
public boolean regionMatches(boolean ignoreCase, int offset, String other, int otherOffset, int length) |
public boolean regionMatches(int offset, String other, int otherOffset, int length) |
Parameter |
Description |
ignoreCase |
Optional. If set to true, the comparison between regions will be case-insensitive. Defaults to false |
offset |
Mandatory. The starting position in the string of the first region. |
other |
Mandatory. The string containing the second region being compared |
otherOffset |
Mandatory. The starting position in the second string of the second region. |
length |
Mandatory. The length of the regions being compared. |
Returns |
Returns true if the two regions are equal; otherwise, returns false. |
Java Version |
Any |