| 59 | } |
| 60 | |
| 61 | std::string normalize_text(std::string_view text) { |
| 62 | const std::string space = "\xE2\x96\x81"; |
| 63 | std::string out = space; |
| 64 | for (char ch : text) { |
| 65 | if (ch == ' ') { |
| 66 | out += space; |
| 67 | } else { |
| 68 | out.push_back(ch); |
| 69 | } |
| 70 | } |
| 71 | return out; |
| 72 | } |
| 73 | |
| 74 | std::string byte_fallback_token(unsigned char byte) { |
| 75 | constexpr char kHex[] = "0123456789ABCDEF"; |