We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 54a8b69 commit afb63fbCopy full SHA for afb63fb
Check.cs
@@ -73,6 +73,19 @@ public static bool IsAValidPhilippineMobileNumber(string str)
73
return Regex.IsMatch(Regex.Replace(str, @"[\s\-\(\)]", ""), pattern);
74
}
75
76
+ public static bool IsAllNumbers(string str)
77
+ {
78
+ string numbers = "0123456789";
79
+ foreach (char a in str)
80
81
+ if (!numbers.Contains(a))
82
83
+ return false;
84
+ }
85
86
+ return true;
87
88
+
89
public static bool HasNumbers(string str)
90
{
91
string numbers = "0123456789";
0 commit comments