Returns true iff `c` is a UTF-8 lead code unit (which must be followed by 1-3 following units). */
| 186 | /** Returns true iff `c` is a UTF-8 lead code unit (which must be followed |
| 187 | by 1-3 following units). */ |
| 188 | constexpr bool lead_code_unit(char8_type c) |
| 189 | { |
| 190 | return uint8_t((unsigned char)c - 0xc2) <= 0x32; |
| 191 | } |
| 192 | |
| 193 | /** Returns true iff `c` is a UTF-8 continuation code unit. */ |
| 194 | constexpr bool continuation(char8_type c) { return (int8_t)c < -0x40; } |