| 36 | |
| 37 | static RE2 stripEscapeRegex = strf("\\{:c}[^;]*{:c}", CmdEsc, EndEsc); |
| 38 | String stripEscapeCodes(String const& s) { |
| 39 | if (s.empty()) |
| 40 | return s; |
| 41 | std::string result = s.utf8(); |
| 42 | RE2::GlobalReplace(&result, stripEscapeRegex, ""); |
| 43 | return String(std::move(result)); |
| 44 | } |
| 45 | |
| 46 | bool processText(StringView text, TextCallback textFunc, CommandsCallback commandsFunc, bool includeCommandSides) { |
| 47 | std::string_view str = text.utf8(); |
no test coverage detected