summaryrefslogtreecommitdiff
path: root/unicode.h
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-12-22 18:55:15 -0500
committerpommicket <pommicket@gmail.com>2022-12-22 18:56:41 -0500
commit91ff61cc22c08e2c247b6b689561e6d18cf276e7 (patch)
treef8025b141122ba219fbe45a1a9c2770e49d76905 /unicode.h
parent2667c71e71d77ecade1142c133ed7181ce38c664 (diff)
detail text
Diffstat (limited to 'unicode.h')
-rw-r--r--unicode.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/unicode.h b/unicode.h
index fb9810a..fdd5669 100644
--- a/unicode.h
+++ b/unicode.h
@@ -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