| 73 | } |
| 74 | |
| 75 | size_t get_utf8_str_len(const std::string &str) { |
| 76 | size_t str_len = 0; |
| 77 | for (char c : str) { |
| 78 | str_len += ((c & 0xc0) != 0x80); |
| 79 | } |
| 80 | return str_len; |
| 81 | } |
| 82 | |
| 83 | std::vector<std::string> split_utf8_str(const std::string &str) { |
| 84 | std::vector<std::string> result; |