Classes | Static Public Member Functions | List of all members
Celartem::Url Struct Reference

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)
 

Detailed Description

Url provides utility functions to deal with URL/URI strings.

Member Function Documentation

static String Celartem::Url::canonicalize ( const String inUrl)
static

This function canonicalizes the specified URL. A canonical URL only contains 7bit ASCII characters and any Internationalized Domain Names are also encoded with Punycode.

Parameters
inUrlURL to canonicalize.
Returns
Canonical URL.
static String Celartem::Url::decode ( const String inString)
static

This function unescapes the characters in the specified string.

Parameters
inStringinString to unescape.
Returns
Unescaped string.
static String Celartem::Url::decodeIfEscaped ( const String inString)
static

This function unescapes the characters in the specified string if it seems to be escaped.

Parameters
inStringString to unescape.
Returns
Unescaped string.
static String Celartem::Url::encode ( const String inString)
static

This function escapes the characters in the specified string.

Parameters
inStringString to escape.
Returns
Escaped string.
static String Celartem::Url::encodeIfNotEscaped ( const String inString)
static

This function escapes the characters in the specified string if it does not encoded.

Parameters
inStringString to escape.
Returns
Escaped string.
static String Celartem::Url::getLocalFilePathFromFileUrl ( const String inUrl)
static

This function extracts local file path from the specified local file URL.

Parameters
inUrlURL/path to local file; the file don't have to exist.
Returns
Local file name if succeeded; otherwise NullString.
static String Celartem::Url::idnDecode ( const String inHostName)
static

This function decodes the specified plain ASCII domain name into a corresponding Internationalized Domain Name.

Parameters
inHostNameHost name to decode.
Returns
Decoded IDN domain name.
static String Celartem::Url::idnEncode ( const String inHostName)
static

This function encodes the specified Internationalized Domain Name into a corresponding plain ASCII domain name.

Parameters
inHostNameHost name to encode.
Returns
Encoded ASCII domain name.
static bool Celartem::Url::isEncoded ( const String inString)
static

This function determines whether the specified string is URL-encoded or not.

Parameters
inStringString to check.
Returns
true if the string is already encoded; otherwise false.
static bool Celartem::Url::isUnsafeChar ( UChar4  inChar)
inlinestatic

This function returns the character is unsafe or not.

Parameters
inCharA character to be verified.
Returns
true if unsafe, otherwise false.
static void Celartem::Url::separateUrl ( UrlComponents outComponents,
const String inUrl 
)
static

This function cracks the input URL/URI into parts and returns them in an UrlComponents structure.

Parameters
outComponentsAn UrlComponents instance that receives the result.
inUrlAn URL to crack.

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

Cuminas DjVu SDK 3.0.33103
This document is made with doxygen 1.8.5 at Sun Dec 15 2013 19:38:07.
Cuminas Logo