-rw-r--r-- | src/util.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/util.cc b/src/util.cc index 48e486a..76e684f 100644 --- a/src/util.cc +++ b/src/util.cc | |||
@@ -1,16 +1,17 @@ | |||
1 | #include <cstring> | ||
1 | #include "kingate/util.h" | 2 | #include "kingate/util.h" |
2 | #include "kingate/exception.h" | 3 | #include "kingate/exception.h" |
3 | 4 | ||
4 | namespace kingate { | 5 | namespace kingate { |
5 | 6 | ||
6 | static const char *safeChars = | 7 | static const char *safeChars = |
7 | "ABCDEFGHIJKLMNOPQRSTUVWXYZ" | 8 | "ABCDEFGHIJKLMNOPQRSTUVWXYZ" |
8 | "abcdefghijklmnopqrstuvwxyz" | 9 | "abcdefghijklmnopqrstuvwxyz" |
9 | "0123456789" | 10 | "0123456789" |
10 | "_-" ; | 11 | "_-" ; |
11 | 12 | ||
12 | string url_encode(const string& str) { | 13 | string url_encode(const string& str) { |
13 | string rv = str; | 14 | string rv = str; |
14 | string::size_type screwed = 0; | 15 | string::size_type screwed = 0; |
15 | for(;;) { | 16 | for(;;) { |
16 | screwed = rv.find_first_not_of(safeChars,screwed); | 17 | screwed = rv.find_first_not_of(safeChars,screwed); |