| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
7.3 Utility Functions
tld_get_4
- Function: int tld_get_4 (const uint32_t * in, size_t inlen, char ** out)
in: Array of unicode code points to process. Does not need to be zero terminated.
inlen: Number of unicode code points.
out: Zero terminated ascii result string pointer.
Isolate the top-level domain of
inand return it as an ASCII string inout.Return value: Return
TLD_SUCCESSon success, or the correspondingTld_rcerror code otherwise.
tld_get_4z
- Function: int tld_get_4z (const uint32_t * in, char ** out)
in: Zero terminated array of unicode code points to process.
out: Zero terminated ascii result string pointer.
Isolate the top-level domain of
inand return it as an ASCII string inout.Return value: Return
TLD_SUCCESSon success, or the correspondingTld_rcerror code otherwise.
tld_get_z
- Function: int tld_get_z (const char * in, char ** out)
in: Zero terminated character array to process.
out: Zero terminated ascii result string pointer.
Isolate the top-level domain of
inand return it as an ASCII string inout. The input stringinmay be UTF-8, ISO-8859-1 or any ASCII compatible character encoding.Return value: Return
TLD_SUCCESSon success, or the correspondingTld_rcerror code otherwise.
tld_get_table
- Function: const Tld_table * tld_get_table (const char * tld, const Tld_table ** tables)
tld: TLD name (e.g. "com") as zero terminated ASCII byte string.
tables: Zero terminated array of
Tld_tableinfo-structures for TLDs.Get the TLD table for a named TLD by searching through the given TLD table array.
Return value: Return structure corresponding to TLD
tldby going thrutables, or returnNULLif no such structure is found.
tld_default_table
- Function: const Tld_table * tld_default_table (const char * tld, const Tld_table ** overrides)
tld: TLD name (e.g. "com") as zero terminated ASCII byte string.
overrides: Additional zero terminated array of
Tld_tableinfo-structures for TLDs, orNULLto only use library deault tables.Get the TLD table for a named TLD, using the internal defaults, possibly overrided by the (optional) supplied tables.
Return value: Return structure corresponding to TLD
tld_str, first looking throughoverridesthen thru built-in list, orNULLif no such structure found.
| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on February 1, 2012 using texi2html 5.0.
