diff options
author | pommicket <pommicket@gmail.com> | 2022-12-22 18:55:15 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2022-12-22 18:56:41 -0500 |
commit | 91ff61cc22c08e2c247b6b689561e6d18cf276e7 (patch) | |
tree | f8025b141122ba219fbe45a1a9c2770e49d76905 /unicode.h | |
parent | 2667c71e71d77ecade1142c133ed7181ce38c664 (diff) |
detail text
Diffstat (limited to 'unicode.h')
-rw-r--r-- | unicode.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -8,6 +8,9 @@ static bool unicode_is_start_of_code_point(u8 byte) { // continuation bytes are of the form 10xxxxxx return (byte & 0xC0) != 0x80; } +static bool unicode_is_continuation_byte(u8 byte) { + return (byte & 0xC0) == 0x80; +} // A lot like mbrtoc32. Doesn't depend on the locale though, for one thing. // *c will be filled with the next UTF-8 code point in `str`. `bytes` refers to the maximum |