| 37 | } |
| 38 | |
| 39 | String urlEncodeQueryParam(const String & s) |
| 40 | { |
| 41 | String out; |
| 42 | out.reserve(s.size() * 3); |
| 43 | for (const unsigned char c : s) |
| 44 | { |
| 45 | if ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') || c == '-' || c == '_' || c == '.' || c == '~') |
| 46 | { |
| 47 | out += static_cast<char>(c); |
| 48 | } |
| 49 | else if (c == ' ') |
| 50 | { |
| 51 | out += '+'; |
| 52 | } |
| 53 | else |
| 54 | { |
| 55 | static constexpr const char hex[] = "0123456789ABCDEF"; |
| 56 | out += '%'; |
| 57 | out += hex[c >> 4]; |
| 58 | out += hex[c & 0xF]; |
| 59 | } |
| 60 | } |
| 61 | return out; |
| 62 | } |
| 63 | |
| 64 | void SystemTable::setName(ExprSchemaTable * est) const |
| 65 | { |
no test coverage detected