#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 82 of file URI.cpp.
83{
84 static unsigned char hexchars[] = "0123456789ABCDEF";
85
87
88 const char* psz = _str.data();
89 for (; *psz; psz++) {
90 unsigned char c = (unsigned char)*psz;
91 if (c == ' ')
93 else if ((c < '0' && c != '-' && c != '.')
94 || (c < 'A' && c > '9')
95 || (c > 'Z' && c < 'a' && c != '_')
96 || (c > 'z')
97 ) {
99 r += (char)hexchars[c >> 4];
100 r += (char)hexchars[c & 15];
101 }
102 else
104 }
106}
◆ encode() [2/2]
| String URLEncoder::encode |
( |
const String & | _str | ) |
|
|
static |
Definition at line 108 of file URI.cpp.
109{
112 UTF8Encoder::encode(_str)
113 )
114 );
115}
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: