| 119 | // |
| 120 | |
| 121 | static size_t utf8_len(char src) { |
| 122 | const size_t lookup[] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 3, 4 }; |
| 123 | uint8_t highbits = static_cast<uint8_t>(src) >> 4; |
| 124 | return lookup[highbits]; |
| 125 | } |
| 126 | |
| 127 | static void replace_all(std::string & s, const std::string & search, const std::string & replace) { |
| 128 | std::string result; |
no outgoing calls
no test coverage detected