diff options
Diffstat (limited to 'libalee/ctype.hpp')
-rw-r--r-- | libalee/ctype.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libalee/ctype.hpp b/libalee/ctype.hpp index 878c747..499a90f 100644 --- a/libalee/ctype.hpp +++ b/libalee/ctype.hpp @@ -25,6 +25,12 @@ #include <cstdint> +constexpr inline unsigned strlen(const char * const s) { + unsigned i = 0; + while (s[i]) i++; + return i; +} + constexpr inline bool isspace(uint8_t c) { return c == ' ' || c == '\t' || c == '\r' || c == '\n'; } |