diff --git a/include/gp/text/ascii.hpp b/include/gp/text/ascii.hpp new file mode 100644 index 0000000..1da47a5 --- /dev/null +++ b/include/gp/text/ascii.hpp @@ -0,0 +1,13 @@ +#pragma once + +inline bool is_digit(char v) { + return v >= '0' && v <= '9'; +} + +inline bool is_alpha(char v) { + return (v >= 'a' && v <= 'z' )||(v >= 'A' && v <= 'Z'); +} + +inline bool is_alnum(char v) { + return is_alpha(v) || is_digit(v); +} \ No newline at end of file