diff options
| author | Tyge Lovset <[email protected]> | 2022-06-11 09:30:44 +0200 |
|---|---|---|
| committer | Tyge Lovset <[email protected]> | 2022-06-11 09:30:44 +0200 |
| commit | 69e930f36ab18999009d064f08e2a0b4f10733b3 (patch) | |
| tree | e326a5a12bc94257143d48cc237bf05d15c26a7b /src/utf8code.c | |
| parent | d5f213e6186264461295a91ba80f17ecabc09455 (diff) | |
| download | STC-modified-69e930f36ab18999009d064f08e2a0b4f10733b3.tar.gz STC-modified-69e930f36ab18999009d064f08e2a0b4f10733b3.zip | |
Improving cregex, and minors, e.g. cstr_foldcase=>cstr_casefold.
Diffstat (limited to 'src/utf8code.c')
| -rw-r--r-- | src/utf8code.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/utf8code.c b/src/utf8code.c index f64ede70..dff10409 100644 --- a/src/utf8code.c +++ b/src/utf8code.c @@ -56,13 +56,6 @@ uint32_t utf8_peek(const char* s, int pos) { return d.codep; } -bool utf8_valid(const char* s) { - utf8_decode_t d = {.state=0}; - while (*s) - utf8_decode(&d, (uint8_t)*s++); - return d.state == 0; -} - bool utf8_valid_n(const char* s, size_t nbytes) { utf8_decode_t d = {.state=0}; while ((nbytes-- != 0) & (*s != 0)) @@ -216,7 +209,7 @@ cstr cstr_toupper(const cstr* self) { return cstr_tocase(self, fn_toupper); } -void cstr_foldcase(cstr* self) { +void cstr_casefold(cstr* self) { cstr_take(self, cstr_tocase(self, fn_tofold)); } |
