Use isAscii...()
This commit is contained in:
1 parent
26ec59507d
commit
7b252a5bb5
3 files changed
+17
-17
No files matched your search
@@ -131,7 +131,7 @@ namespace Elwig.Helpers {
|
||||
}
|
||||
|
||||
public static int Modulo(string a, int b) {
|
||||
if (a.Length == 0 || !a.All(char.IsDigit)) {
|
||||
if (a.Length == 0 || !a.All(char.IsAsciiDigit)) {
|
||||
throw new ArgumentException("First argument has to be a decimal string");
|
||||
} else if (b < 2) {
|
||||
throw new ArgumentException("Second argument has to be greater than 1");
|
||||
|
||||
Reference in new issue
Block a user