show dbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
/* | |
* Simple utf-8 utility for C byte strings. | |
* References: https://www.instructables.com/Programming--how-to-detect-and-read-UTF-8-charact/ | |
*/ | |
uint32_t u8_get_char(const char *str, int *index){ | |
// use of binary integer literals is accepted in GCC, not sure of other C compilers. |