summaryrefslogtreecommitdiff
path: root/src/unicode.h
diff options
context:
space:
mode:
authorPhil Jones <philj56@gmail.com>2022-11-24 12:48:39 +0000
committerPhil Jones <philj56@gmail.com>2022-11-24 12:48:39 +0000
commit03fc67cc74cc08fff5eb61e855b54174683614ff (patch)
treedc8376aa977a0cff31ebc0d4283cb77cce0e934e /src/unicode.h
parente19d821a7ec5d8b8d528be93626bbc2effd15320 (diff)
Speed up string vector filtering and loading.
We can assume that string vectors generated by tofi are already normalised, so don't waste time normalising them again. Also make sure to validate strings from the user.
Diffstat (limited to 'src/unicode.h')
-rw-r--r--src/unicode.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/unicode.h b/src/unicode.h
index e198231..d32303d 100644
--- a/src/unicode.h
+++ b/src/unicode.h
@@ -2,6 +2,7 @@
#define UNICODE_H
#include <glib.h>
+#include <stdbool.h>
#include <stdint.h>
uint8_t utf32_to_utf8(uint32_t c, char *buf);
@@ -24,5 +25,6 @@ size_t utf8_strlen(const char *s);
char *utf8_strcasestr(const char * restrict haystack, const char * restrict needle);
char *utf8_normalize(const char *s);
char *utf8_compose(const char *s);
+bool utf8_validate(const char *s);
#endif /* UNICODE_H */