The following code segment (it may have some errors in it) is comparing two strings to see if they are identical. I want to compare to see if they are the same names, not just the same length. Is this correct. if the 1st last nme is kennedy and the second last name is Eubanks(both names are 7 chars long) then will it pick up that these names are not the same? If not how can that be done without using C?
lstname1= token.1substring(0,length)
lstname2= token2.substring(o,length)
bool compare (string a, string b)
{
if (lstname1==lstname2)
return true;
else
return false;
}