22 if ((
'0' <= c && c <=
'9') ||
23 (
'A' <= c && c <=
'Z') ||
24 (
'a' <= c && c <=
'z') ||
25 (c ==
'~' || c ==
'-' || c ==
'_' || c ==
'.')
28 escaped.push_back (c);
32 static const char symbolLookup[] =
"0123456789ABCDEF";
34 escaped.push_back (
'%');
36 escaped.push_back (symbolLookup[(c & 0xF0) >> 4]);
37 escaped.push_back (symbolLookup[(c & 0x0F) >> 0]);
Declare a function to perform URL encoding of a string.
std::string UrlEncode(const std::string &url)