/* Copyright 2011, Range Networks, Inc. */ #include #include #include #include //based on javascript encodeURIComponent() std::string URLEncode(const std::string &c) { static const char *digits = "01234567890ABCDEF"; std::string retVal=""; for (size_t i=0; i>4) & 0x0f]; retVal += digits[ch & 0x0f]; } } return retVal; }