| 66 | static constexpr uint16_t kUTF8ValidateReject = 256; |
| 67 | |
| 68 | static inline uint8_t DecodeOneUTF8Byte(uint8_t byte, uint8_t state, uint32_t* codep) { |
| 69 | uint8_t type = utf8_small_table[byte]; |
| 70 | |
| 71 | *codep = (state != kUTF8DecodeAccept) ? (byte & 0x3fu) | (*codep << 6) |
| 72 | : (0xff >> type) & (byte); |
| 73 | |
| 74 | state = utf8_small_table[256 + state + type]; |
| 75 | return state; |
| 76 | } |
| 77 | |
| 78 | static inline uint16_t ValidateOneUTF8Byte(uint8_t byte, uint16_t state) { |
| 79 | return utf8_large_table[state + byte]; |
nothing calls this directly
no outgoing calls
no test coverage detected