| 27 | }; |
| 28 | |
| 29 | std::string SanitizeString(std::string_view str, int rule) |
| 30 | { |
| 31 | std::string result; |
| 32 | for (char c : str) { |
| 33 | if (SAFE_CHARS[rule].find(c) != std::string::npos) { |
| 34 | result.push_back(c); |
| 35 | } |
| 36 | } |
| 37 | return result; |
| 38 | } |
| 39 | |
| 40 | bool IsHex(std::string_view str) |
| 41 | { |