/**
* widechar_width.h, generated on 2022-02-11.
* See https://github.com/ridiculousfish/widecharwidth/
*
* SHA1 file hashes:
* UnicodeData.txt: 8a5c26bfb27df8cfab23cf2c34c62d8d3075ae4d
* EastAsianWidth.txt: 8ec36ccac3852bf0c2f02e37c6151551cd14db72
* emoji-data.txt: 3f0ec08c001c4bc6df0b07d01068fc73808bfb4c
*/
#ifndef WIDECHAR_WIDTH_H
#define WIDECHAR_WIDTH_H
#include <algorithm>
#include <iterator>
#include <cstddef>
#include <cstdint>
namespace utf8 {
/* Special width values */
enum {
widechar_nonprint = 0, // The character is not printable.
widechar_combining = 0, // The character is a zero-width combiner.
widechar_ambiguous = 1, // The character is East-Asian ambiguous width.
widechar_private_use = 1, // The character is for private use.
widechar_unassigned = 0, // The character is unassigned.
widechar_widened_in_9 = 2, // Width is 1 in Unicode 8, 2 in Unicode 9+.
widechar_non_character = 0 // The character is a noncharacter.
};
/* An inclusive range of characters. */
struct widechar_range {
uint32_t lo;
uint32_t hi;
};
/* Simple ASCII characters - used a lot, so we check them first. */
static const struct widechar_range widechar_ascii_table[] = {
{0x00020, 0x0007E}
};
/* Private usage range. */
static const struct widechar_range widechar_private_table[] = {
{0x0E000, 0x0F8FF},
{0xF0000, 0xFFFFD},
{0x100000,