private unsafe static char * MatchChars(char* p, char* str) {
BCLDebug.Assert(p != null && str != null, "");
if (*str == '\0') {
return null;
}
for (; (*str != '\0'); p++, str++) {
if (*p != *str) { //We only hurt the failure case
if ((*str == '\u00A0') && (*p == '\u0020')) {// This fix is for French or Kazakh cultures. Since a user cannot type 0xA0 as a
// space character we use 0x20 space character instead to mean the same.
continue;
}
return null;
}
}
return p;
}