I am looking for the fastest comparison which will start from the left of one string, and return true if ALL the characters of the first string match the first x characters of the 2nd string where x is the length of the first string.
For example:
String s1 = "YI" ;
String s2 = "YIPES" ;
String s3 = "Y" ;
s1 = s2 would return true
s1 = s3 would return false
This would be part of a larger loop, so I am looking for the fastest comparision method. Regex maybe
Many thaks
Mike Thomas

Compare 2 Strings of Diff Length
papadi
Kamel Balquis
Mike Thomas