diff options
| author | Joel Klinghed <the_jk@spawned.biz> | 2025-09-10 22:12:22 +0200 |
|---|---|---|
| committer | Joel Klinghed <the_jk@spawned.biz> | 2025-09-10 22:12:22 +0200 |
| commit | 32e14551a90e85000e41b3f0445d34d58a1431e4 (patch) | |
| tree | 912c1e50b93b501446b1b179ee2a3e93586fb854 /src/u.hh | |
| parent | cf99d0c865474105c14b2348fdbd1c83d87d5a29 (diff) | |
Add unicode general category lookup
Generate the lookup tables from UnicodeData.txt, do to that,
add gen_ugc, which uses csv, buffers, line, io and other modules
to do the job.
Diffstat (limited to 'src/u.hh')
| -rw-r--r-- | src/u.hh | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -1,6 +1,8 @@ #ifndef U_HH #define U_HH +#include "ugc.hh" // IWYU pragma: export + namespace u { enum class ReadError : uint8_t { @@ -14,6 +16,22 @@ enum class ReadErrorReplace : uint8_t { Incomplete, // Too few bytes }; +enum class Version : uint8_t { + u6_2_0, + u8_0_0, + u10_0_0, + u11_0_0, + u12_1_0, + u13_0_0, + u14_0_0, + u15_0_0, + u15_1_0, + u16_0_0, + LATEST = u16_0_0, +}; + +GeneralCategory lookup_gc(uint32_t code, Version version = Version::LATEST); + } // namespace u #endif // U_HH |
