Meta.StringExtensions.HasWhiteSpace C# (CSharp) Method

HasWhiteSpace() public static method

Determines whether the string has white space.
public static HasWhiteSpace ( this s ) : bool
s this The string to test for white space.
return bool
        public static bool HasWhiteSpace(this string s)
        {
            if (s == null)
                throw new ArgumentNullException("s");

            for (int i = 0; i < s.Length; i++)
            {
                if (char.IsWhiteSpace(s[i]))
                    return true;
            }
            return false;
        }