Fan.Sys.FanInt.isAlphaNum C# (CSharp) Méthode

isAlphaNum() public static méthode

public static isAlphaNum ( long self ) : bool
self long
Résultat bool
        public static bool isAlphaNum(long self)
        {
            try
              {
            return (self < 128 && (charMap[(int)self] & ALPHANUM) != 0);
              }
              catch (IndexOutOfRangeException)
              {
            // should be very rare to use this method with negative
            // numbers, so don't take the hit every call
            return false;
              }
        }

Usage Example

Exemple #1
0
        public static Regex glob(string pattern)
        {
            StringBuilder s = new StringBuilder();

            for (int i = 0; i < pattern.Length; ++i)
            {
                int c = pattern[i];
                if (FanInt.isAlphaNum(c))
                {
                    s.Append((char)c);
                }
                else if (c == '?')
                {
                    s.Append('.');
                }
                else if (c == '*')
                {
                    s.Append('.').Append('*');
                }
                else
                {
                    s.Append('\\').Append((char)c);
                }
            }
            return(new Regex(s.ToString()));
        }
All Usage Examples Of Fan.Sys.FanInt::isAlphaNum