aboutsummaryrefslogtreecommitdiff
path: root/utf8.h
diff options
context:
space:
mode:
authorLukas Fürmetz <fuermetz@mailbox.org>2017-11-15 22:06:06 +0100
committerLukas Fürmetz <fuermetz@mailbox.org>2017-11-16 12:05:24 +0100
commit865528b34398ee4ad9d7dcfa86e54e27106bd4d5 (patch)
treea284a217be7bfc42fcceb37c26552f87ac8bd974 /utf8.h
parentbcf25fa15a086ac8c083835e4d2d3cde1642740e (diff)
Extract utf8.c
Diffstat (limited to 'utf8.h')
-rw-r--r--utf8.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/utf8.h b/utf8.h
new file mode 100644
index 0000000..4acf955
--- /dev/null
+++ b/utf8.h
@@ -0,0 +1,7 @@
+#include <stdbool.h>
+#include <stddef.h>
+#include <stdint.h>
+
+size_t codepoint_to_utf8(const uint32_t codepoint, unsigned char buffer[4]);
+bool utf8_to_codepoint(const unsigned char buffer[4], const size_t len,
+ uint32_t *codepoint);