xmltooling::URLEncoder Class Reference

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.

## Detailed Description

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.

## Member Function Documentation

## 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

  s | input string to encode

Returns
  a string object containing the result of encoding the input

## isBad()

virtual bool xmltooling::URLEncoder::isBad | ( | char | ch | ) | const

protected virtual

Returns true iff the input character requires encoding.

Parameters

  ch | the character to check

Returns
  true iff the character should be encoded

The documentation for this class was generated from the following file:

- xmltooling/util/URLEncoder.h