| 305 | } |
| 306 | |
| 307 | static inline bool Utf8Is4ByteStart(const uint8_t codeunit) { |
| 308 | return (codeunit & 0xF8) == 0xF0; // upper five bits should be 11110 |
| 309 | } |
| 310 | |
| 311 | /// Return the number of bytes required to UTF8-encode the given codepoint |
| 312 | static inline int32_t UTF8EncodedLength(uint32_t codepoint) { |