Use isAscii...()

This commit is contained in:
2023-04-27 16:28:37 +02:00
parent 26ec59507d
commit 7b252a5bb5
3 changed files with 17 additions and 17 deletions

View File

@ -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");