Interface to a URL-encoding mechanism along with a default implementation. More...
#include <xmltooling/util/URLEncoder.h>
Public Member Functions | |
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. | |
Protected Member Functions | |
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.
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.
s | input string to decode in a writable buffer |
virtual std::string xmltooling::URLEncoder::encode | ( | const char * | s | ) | const [virtual] |
Produce a URL-safe but equivalent version of the input string.
s | input string to encode |
virtual bool xmltooling::URLEncoder::isBad | ( | char | ch | ) | const [protected, virtual] |
Returns true iff the input character requires encoding.
ch | the character to check |