blob: 663e7e31cdfac68b6cf7ab53721a27aebf3fb1c0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#ifndef MGL_UTF8_H
#define MGL_UTF8_H
#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
bool mgl_utf8_is_valid(const unsigned char *str, size_t size);
/*
Returns the byte length of the decoded codepoint.
Note: does not validate if the input |str| is a valid utf8 string.
*/
size_t mgl_utf8_decode(const unsigned char *str, uint32_t *decoded_codepoint);
#endif /* MGL_UTF8_H */
|