From 69e930f36ab18999009d064f08e2a0b4f10733b3 Mon Sep 17 00:00:00 2001 From: Tyge Lovset Date: Sat, 11 Jun 2022 09:30:44 +0200 Subject: Improving cregex, and minors, e.g. cstr_foldcase=>cstr_casefold. --- src/utf8code.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/utf8code.c') 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)); } -- cgit v1.2.3