| 168 | } |
| 169 | |
| 170 | std::string decodeURI(const std::string& input) |
| 171 | { |
| 172 | std::string result; |
| 173 | for (size_t i = 0; i < input.length(); i++) |
| 174 | { |
| 175 | if (input[i] == '%') |
| 176 | { |
| 177 | if (i + 2 < input.length()) |
| 178 | { |
| 179 | std::string hex = input.substr(i + 1, 2); |
| 180 | char c = static_cast<char>(strtol(hex.c_str(), nullptr, 16)); |
| 181 | result += c; |
| 182 | i += 2; |
| 183 | } |
| 184 | } |
| 185 | else if (input[i] == '+') |
| 186 | { |
| 187 | result += ' '; |
| 188 | } |
| 189 | else |
| 190 | { |
| 191 | result += input[i]; |
| 192 | } |
| 193 | } |
| 194 | return result; |
| 195 | } |
| 196 | |
| 197 | bool parseArrayIndex(const std::string& name, std::string& nonArray, uint32_t& index) |
| 198 | { |