summaryrefslogtreecommitdiff
path: root/unicode.h
blob: 3f7609088370992fe8581b847126470e9b8d56ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#ifndef UNICODE_H_
#define UNICODE_H_
#define UNICODE_BOX_CHARACTER 0x2610
#define UNICODE_CODE_POINTS 0x110000 // number of Unicode code points

static bool unicode_is_start_of_code_point(u8 byte) {
	// see https://en.wikipedia.org/wiki/UTF-8#Encoding
	// continuation bytes are of the form 10xxxxxx
	return (byte & 0xC0) != 0x80;
}

#endif