str2.regionMatches(ignoreCase: boolean, index: int, str1: String, str1Index: int, len: int): boolean
class regionignorecase
{
public static void main(String[] arg)
{
String str1 = "Welcome to Smartprogrammeron.blogspot.in";
String str2 = new String("Welcome to SmartProgrammerOn.blogspot.in");
System.out.println("str1.regionMatchescase(ignoreCase:true or fasle,offset of str1=10,str2,offset of str2=10,length=25) is " + str1.regionMatches(true,\10,str2,10,25));
System.out.println("str1.regionMatchescase(ignoreCase:true or fasle,offset of str1=0,str2,offset of str2=0,length=10) is " + str1.regionMatches(true,0,str2,0,10));
}
}
for true of ignoreCase it will ignore upper case and lower case but for false it will work case sensitive.
{
public static void main(String[] arg)
{
String str1 = "Welcome to Smartprogrammeron.blogspot.in";
String str2 = new String("Welcome to SmartProgrammerOn.blogspot.in");
System.out.println("str1.regionMatchescase(ignoreCase:true or fasle,offset of str1=10,str2,offset of str2=10,length=25) is " + str1.regionMatches(true,\10,str2,10,25));
System.out.println("str1.regionMatchescase(ignoreCase:true or fasle,offset of str1=0,str2,offset of str2=0,length=10) is " + str1.regionMatches(true,0,str2,0,10));
}
}
for true of ignoreCase it will ignore upper case and lower case but for false it will work case sensitive.