Loading...
Searching...
No Matches
unicode.h
Go to the documentation of this file.
1// BSD 3-Clause License; see https://github.com/scikit-hep/awkward/blob/main/LICENSE
2#include <cstddef>
3#include <cstdint>
4
5#ifndef AWKWARD_UNICODE_H_
6#define AWKWARD_UNICODE_H_
7
8
9#define UTF8_ONE_BYTE_MASK 0x80
10#define UTF8_ONE_BYTE_BITS 0
11#define UTF8_TWO_BYTES_MASK 0xE0
12#define UTF8_TWO_BYTES_BITS 0xC0
13#define UTF8_THREE_BYTES_MASK 0xF0
14#define UTF8_THREE_BYTES_BITS 0xE0
15#define UTF8_FOUR_BYTES_MASK 0xF8
16#define UTF8_FOUR_BYTES_BITS 0xF0
17#define UTF8_CONTINUATION_MASK 0xC0
18#define UTF8_CONTINUATION_BITS 0x80
19
20
21size_t utf8_codepoint_size(const uint8_t byte);
22
23#endif // AWKWARD_UNICODE_H_
size_t utf8_codepoint_size(const uint8_t byte)