string regionMatches

regionMatches() String Example

regionMatches() used to compare substrings of two strings java.lang.String class comes with many methods to check two strings contain same characters in the same sequence. To do this, String class comes with equals(), equalsIgnoreCase(), compareTo() and compareToIgnoreCase() methods. All the above comparisons are used to compare whole strings. But regionMatches()…