#include <URI.h>
|
static ByteString | encode (const ByteString &_str) |
static String | encode (const String &_str) |
Definition at line 26 of file URI.h.
◆ encode() [1/2]
ByteString URLEncoder::encode |
( |
const ByteString & | _str | ) |
|
|
static |
Definition at line 83 of file URI.cpp.
84{
85 static unsigned char hexchars[] = "0123456789ABCDEF";
86
88
89 const char* psz = _str.data();
90 for (; *psz; psz++)
91 {
92 unsigned char c = (unsigned char)*psz;
93 if (c == ' ')
95 else if ((c < '0' && c != '-' && c != '.')
96 || (c < 'A' && c > '9')
97 || (c > 'Z' && c < 'a' && c != '_')
98 || (c > 'z'))
99 {
101 r += (char)hexchars[c >> 4];
102 r += (char)hexchars[c & 15];
103 }
104 else
106 }
108}
◆ encode() [2/2]
String URLEncoder::encode |
( |
const String & | _str | ) |
|
|
static |
Definition at line 110 of file URI.cpp.
111{
114 UTF8Encoder::encode(_str)
115 )
116 );
117}
static String decode(const char *_mbs, size_t _mbslen=(size_t) -1)
static ByteString encode(const ByteString &_str)
The documentation for this class was generated from the following files: