| 485 | } |
| 486 | |
| 487 | static size_t utf8_len(char src) { |
| 488 | const size_t lookup[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 4}; |
| 489 | uint8_t highbits = static_cast<uint8_t>(src) >> 4; |
| 490 | return lookup[highbits]; |
| 491 | } |
| 492 | |
| 493 | static std::string strip_accents(const std::string& in_str) { |
| 494 | std::string out_str; |