utf8: update utf8_is_valid() a bit
Let's avoid a few casts in the function. Also, let's drop the "const" when returning the string, for similar reasons as strchr() and friends drop it: so that we don't add a const if the user passes in a non-const string.
This commit is contained in:
+1
-1
@@ -14,7 +14,7 @@
|
||||
|
||||
bool unichar_is_valid(char32_t c);
|
||||
|
||||
const char *utf8_is_valid(const char *s) _pure_;
|
||||
char *utf8_is_valid(const char *s) _pure_;
|
||||
char *ascii_is_valid(const char *s) _pure_;
|
||||
char *ascii_is_valid_n(const char *str, size_t len);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user