diff options
| author | Tyge Løvset <[email protected]> | 2022-08-09 02:48:33 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2022-08-09 02:48:33 +0200 |
| commit | 2df3fb58bb21be5afcfa78fd0b5d1aee033ebe9e (patch) | |
| tree | 48278f967e32afeca21f3791ba9cbc8d5e0cd348 /include/stc/utf8.h | |
| parent | 0861b814130ab77b0e228e6f41a8c898959d69f1 (diff) | |
| download | STC-modified-2df3fb58bb21be5afcfa78fd0b5d1aee033ebe9e.tar.gz STC-modified-2df3fb58bb21be5afcfa78fd0b5d1aee033ebe9e.zip | |
Internal stuff.
Diffstat (limited to 'include/stc/utf8.h')
| -rw-r--r-- | include/stc/utf8.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/stc/utf8.h b/include/stc/utf8.h index 2dd51927..c20b80cb 100644 --- a/include/stc/utf8.h +++ b/include/stc/utf8.h @@ -5,8 +5,7 @@ #include <ctype.h> // utf8 methods defined in src/utf8code.c: -extern bool utf8_islower(uint32_t c); -extern bool utf8_isupper(uint32_t c); + extern bool utf8_isspace(uint32_t c); extern bool utf8_isdigit(uint32_t c); extern bool utf8_isxdigit(uint32_t c); @@ -20,6 +19,9 @@ extern int utf8_icmp_sv(csview s1, csview s2); extern unsigned utf8_encode(char *out, uint32_t c); extern uint32_t utf8_peek(const char *s, int u8pos); +STC_INLINE bool utf8_isupper(uint32_t c) { return utf8_tolower(c) != c; } +STC_INLINE bool utf8_islower(uint32_t c) { return utf8_toupper(c) != c; } + /* following functions uses src/utf8code.c */ /* decode next utf8 codepoint. https://bjoern.hoehrmann.de/utf-8/decoder/dfa */ |
