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

isSpace() public static méthode

public static isSpace ( long self ) : bool
self long
Résultat bool
        public static bool isSpace(long self)
        {
            try
              {
            return (self < 128 && (charMap[(int)self] & SPACE) != 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 string makeTrim(StringBuilder s)
        {
            int start = 0;
            int end   = s.Length;

            while (start < end)
            {
                if (FanInt.isSpace(s[start]))
                {
                    start++;
                }
                else
                {
                    break;
                }
            }
            while (end > start)
            {
                if (FanInt.isSpace(s[end - 1]))
                {
                    end--;
                }
                else
                {
                    break;
                }
            }
            return(s.ToString(start, end - start));
        }
All Usage Examples Of Fan.Sys.FanInt::isSpace