str2.regionMatches(index: int, s1: String,s1Index: int, len: int): boolean

class region
{
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.regionMatches(offset of str1=10,str2,offset of str2=10,length=25) is " + str1.regionMatches(10,str2,10,25));
       System.out.println("str1.regionMatches(offset of str1=0,str2,offset of str2=0,length=10) is " + str1.regionMatches(0,str2,0,10));
}
}




It will match on given region of two strings.

Popular posts from this blog

Shutdown Pc

Ellipse using OpenGl

String Comparisons