diff options
Diffstat (limited to 'std/stdlib.src')
| -rw-r--r-- | std/stdlib.src | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/std/stdlib.src b/std/stdlib.src index 91884d5..e370446 100644 --- a/std/stdlib.src +++ b/std/stdlib.src @@ -40,17 +40,24 @@ let isdigit = (c: i8) => bool { return false; }; -let isalphanum = (c: i8) => bool { - if c > 'a' { - if c < 'z' { +let isalpha = (c: i8) => bool { + if c >= 'a' { + if c <= 'z' { return true; }; }; - if c > 'A' { - if c < 'Z' { + if c >= 'A' { + if c <= 'Z' { return true; }; }; + return false; +}; + +let isalphanum = (c: i8) => bool { + if isalpha(c) { + return true; + }; if isdigit(c) { return true; }; |