| 94 | } |
| 95 | |
| 96 | String extractCodes(String const& s) { |
| 97 | bool escape = false; |
| 98 | StringList result; |
| 99 | String escapeCode; |
| 100 | for (auto c : preprocessEscapeCodes(s)) { |
| 101 | if (c == StartEsc) |
| 102 | escape = true; |
| 103 | if (c == EndEsc) { |
| 104 | escape = false; |
| 105 | for (auto command : escapeCode.split(',')) |
| 106 | result.append(command); |
| 107 | escapeCode = ""; |
| 108 | } |
| 109 | if (escape && (c != StartEsc)) |
| 110 | escapeCode.append(c); |
| 111 | } |
| 112 | if (!result.size()) |
| 113 | return ""; |
| 114 | return "^" + result.join(",") + ";"; |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | } |
nothing calls this directly
no test coverage detected