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