Url provides utility functions to deal with URL/URI strings. More...
#include <cel_urlutil.h>
Classes | |
struct | UrlComponents |
Static Public Member Functions | |
static bool | isUnsafeChar (UChar4 inChar) |
static bool | isEncoded (const String &inString) |
static String | encode (const String &inString) |
static String | decode (const String &inString) |
static String | decodeIfEscaped (const String &inString) |
static String | encodeIfNotEscaped (const String &inString) |
static String | idnEncode (const String &inHostName) |
static String | idnDecode (const String &inHostName) |
static String | canonicalize (const String &inUrl) |
static String | getLocalFilePathFromFileUrl (const String &inUrl) |
static void | separateUrl (UrlComponents &outComponents, const String &inUrl) |
Url provides utility functions to deal with URL/URI strings.
This function canonicalizes the specified URL. A canonical URL only contains 7bit ASCII characters and any Internationalized Domain Names are also encoded with Punycode.
inUrl | URL to canonicalize. |
This function unescapes the characters in the specified string.
inString | inString to unescape. |
This function unescapes the characters in the specified string if it seems to be escaped.
inString | String to unescape. |
This function escapes the characters in the specified string.
inString | String to escape. |
This function escapes the characters in the specified string if it does not encoded.
inString | String to escape. |
This function extracts local file path from the specified local file URL.
inUrl | URL/path to local file; the file don't have to exist. |
This function decodes the specified plain ASCII domain name into a corresponding Internationalized Domain Name.
inHostName | Host name to decode. |
This function encodes the specified Internationalized Domain Name into a corresponding plain ASCII domain name.
inHostName | Host name to encode. |
|
static |
This function determines whether the specified string is URL-encoded or not.
inString | String to check. |
true
if the string is already encoded; otherwise false
.
|
inlinestatic |
This function returns the character is unsafe or not.
inChar | A character to be verified. |
true
if unsafe, otherwise false
.
|
static |
This function cracks the input URL/URI into parts and returns them in an UrlComponents structure.
outComponents | An UrlComponents instance that receives the result. |
inUrl | An URL to crack. |