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

isAlpha() public static méthode

public static isAlpha ( long self ) : bool
self long
Résultat bool
        public static bool isAlpha(long self)
        {
            try
              {
            return (self < 128 && (charMap[(int)self] & ALPHA) != 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
 static void checkId(string id)
 {
     if (id.Length == 0)
     {
         throw ParseErr.make("Invalid unit id length 0").val;
     }
     for (int i = 0; i < id.Length; ++i)
     {
         int c = id[i];
         if (FanInt.isAlpha(c) || c == '_' || c == '%' || c == '$' || c == '/' || c > 128)
         {
             continue;
         }
         throw ParseErr.make("Invalid unit id " + id + " (invalid char '" + (char)c + "')").val;
     }
 }
All Usage Examples Of Fan.Sys.FanInt::isAlpha