Skip to content

Instantly share code, notes, and snippets.

struct DecodeResult {
uint32_t codepoint;
uint32_t decodedBytes;
};
static inline struct DecodeResult DecodeOneUTF8(const uint8_t *utf8) {
static uint8_t byteCountTable[16] = {
// 0xxx
[0x0] = 1,
[0x1] = 1,