summaryrefslogtreecommitdiff
path: root/src/u.hh
blob: 524b2ff9be6378e5eda450a8816355400b833537 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef U_HH
#define U_HH

#include "ugc.hh"  // IWYU pragma: export

namespace u {

enum class ReadError : uint8_t {
  Invalid,     // Invalid sequence
  End,         // At end (it == end)
  Incomplete,  // Too few bytes
};

enum class ReadErrorReplace : uint8_t {
  End,         // At end (it == end)
  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