Interface to a URL-encoding mechanism along with a default implementation.
More...
#include <xmltooling/util/URLEncoder.h>
|
virtual std::string | encode (const char *s) const |
| Produce a URL-safe but equivalent version of the input string.
|
|
virtual void | decode (char *s) const |
| Perform an in-place decoding operation on the input string.
|
|
|
virtual bool | isBad (char ch) const |
| Returns true iff the input character requires encoding.
|
|
Interface to a URL-encoding mechanism along with a default implementation.
Since URL-encoding is not canonical, it's important that the same encoder is used during some library operations and the calling code. Applications can supply an alternative implementation to the library if required.
◆ decode()
virtual void xmltooling::URLEncoder::decode |
( |
char * | s | ) |
const |
|
virtual |
Perform an in-place decoding operation on the input string.
The resulting string will be NULL-terminated.
- Parameters
-
s | input string to decode in a writable buffer |
◆ encode()
virtual std::string xmltooling::URLEncoder::encode |
( |
const char * | s | ) |
const |
|
virtual |
Produce a URL-safe but equivalent version of the input string.
- Parameters
-
- Returns
- a string object containing the result of encoding the input
◆ isBad()
virtual bool xmltooling::URLEncoder::isBad |
( |
char | ch | ) |
const |
|
protectedvirtual |
Returns true iff the input character requires encoding.
- Parameters
-
- Returns
- true iff the character should be encoded
The documentation for this class was generated from the following file: