aboutsummaryrefslogtreecommitdiffstats
path: root/CommonLibs/URLEncode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'CommonLibs/URLEncode.cpp')
-rw-r--r--CommonLibs/URLEncode.cpp28
1 files changed, 0 insertions, 28 deletions
diff --git a/CommonLibs/URLEncode.cpp b/CommonLibs/URLEncode.cpp
deleted file mode 100644
index cdf38dd..0000000
--- a/CommonLibs/URLEncode.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Copyright 2011, Range Networks, Inc. */
-
-#include <URLEncode.h>
-#include <string>
-#include <string.h>
-#include <ctype.h>
-
-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<c.length(); i++)
- {
- const char ch = c[i];
- if (isalnum(ch) || strchr("-_.!~'()",ch)) {
- retVal += ch;
- } else {
- retVal += '%';
- retVal += digits[(ch>>4) & 0x0f];
- retVal += digits[ch & 0x0f];
- }
- }
- return retVal;
-}
-