System.Number.MatchChars C# (CSharp) Method

MatchChars() private static method

private static MatchChars ( char p, char str ) : char*
p char
str char
return char*
        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;
        }

Same methods

Number::MatchChars ( char p, string str ) : char*

Usage Example

        private unsafe static char *MatchChars(char *p, string str)
        {
            char *ptr = str;

            if (ptr != null)
            {
                ptr += RuntimeHelpers.OffsetToStringData / 2;
            }
            return(Number.MatchChars(p, ptr));
        }
All Usage Examples Of System.Number::MatchChars