Net.Bluewalk.DotNetUtils/Extensions/StringExtensions.cs
/// <summary>
/// Check if a string is only digits
/// </summary>
/// <param name="s"></param>
/// <returns></returns>
Check if a string is only digits
Check if a string is only digits
public static bool IsDigitsOnly(this string s)
        {
            var len = s.Length;
            for (var i = 0; i < len; ++i)
            {
                var c = s[i];
                if (c < '0' || c > '9')
                    return false;
            }
            return true;
        }
public static bool IsDigitsOnly ( this string s ) { var len = s . Length ; for ( var i = 0 ; i < len ; ++ i ) { var c = s [ i ] ; if ( c < ' ' || c > ' ' ) return false ; } return true ; }
Check if a string is only digits
Check if a string is only digits
None
string
this
s
None