#include <src/main/decaf/internal/net/URIEncoderDecoder.h>
Public Member Functions | |
| URIEncoderDecoder () | |
| virtual | ~URIEncoderDecoder () |
Static Public Member Functions | |
| static void | validate (const std::string &s, const std::string &legal) |
| Validate a string by checking if it contains any characters other than:. | |
| static void | validateSimple (const std::string &s, const std::string &legal) |
| Validate a string by checking if it contains any characters other than:. | |
| static std::string | quoteIllegal (const std::string &s, const std::string &legal) |
| All characters except letters ('a'. | |
| static std::string | encodeOthers (const std::string &s) |
| Other characters, which are chars that are not US-ASCII, and are not ISO Control or are not ISO Space chars are not preserved. | |
| static std::string | decode (const std::string &s) |
Decodes the string argument which is assumed to be encoded in the x-www-form-urlencoded MIME content type using the UTF-8 encoding scheme. | |
| decaf::internal::net::URIEncoderDecoder::URIEncoderDecoder | ( | ) |
| virtual decaf::internal::net::URIEncoderDecoder::~URIEncoderDecoder | ( | ) | [inline, virtual] |
| static std::string decaf::internal::net::URIEncoderDecoder::decode | ( | const std::string & | s | ) | [static] |
Decodes the string argument which is assumed to be encoded in the x-www-form-urlencoded MIME content type using the UTF-8 encoding scheme.
'' and two following hex digit characters are converted to the equivalent byte value. All other characters are passed through unmodified.
e.g. "A%20B%20C %24%25" -> "A B C $%"
| s | - The encoded string. |
| static std::string decaf::internal::net::URIEncoderDecoder::encodeOthers | ( | const std::string & | s | ) | [static] |
Other characters, which are chars that are not US-ASCII, and are not ISO Control or are not ISO Space chars are not preserved.
They are converted into their hexidecimal value prepended by ''.
For example: Euro currency symbol -> "%E2%82%AC".
| s | - the string to be converted |
| static std::string decaf::internal::net::URIEncoderDecoder::quoteIllegal | ( | const std::string & | s, | |
| const std::string & | legal | |||
| ) | [static] |
All characters except letters ('a'.
.'z', 'A'..'Z') and numbers ('0'..'9') and legal characters are converted into their hexidecimal value prepended by ''.
For example: '#' -> 23
Other characters, which are chars that are not US-ASCII, and are not ISO Control or are not ISO Space chars, are preserved.
| s | - the string to be converted | |
| legal | - the characters allowed to be preserved in the string s |
| static void decaf::internal::net::URIEncoderDecoder::validate | ( | const std::string & | s, | |
| const std::string & | legal | |||
| ) | [static] |
Validate a string by checking if it contains any characters other than:.
1. letters ('a'..'z', 'A'..'Z') 2. numbers ('0'..'9') 3. characters in the legalset parameter 4. characters that are not ISO Control or are not ISO Space characters)
| s | - the string to be validated | |
| legal | - the characters allowed in the string s |
| URISyntaxException | if the uri string is not well formed. |
| static void decaf::internal::net::URIEncoderDecoder::validateSimple | ( | const std::string & | s, | |
| const std::string & | legal | |||
| ) | [static] |
Validate a string by checking if it contains any characters other than:.
1. letters ('a'..'z', 'A'..'Z') 2. numbers ('0'..'9') 3. characters in the legalset parameter
| s | - the string to be validated | |
| legal | - the characters allowed in the string s |
| URISyntaxException | if the uri string is not well formed. |
1.6.1