![]() |
libtld 2.0.14
A library to determine the Top-Level Domain name of any Internet URI.
|
Implementation of some functions converting numbers to strings. More...
Go to the source code of this file.
Functions | |
const char * | tld_status_to_string (enum tld_status status) |
Transform the status to a string. | |
enum tld_category | tld_word_to_category (const char *word, int n) |
This is for backward compatibility. | |
This file includes functions converting numbers to strings.
Definition in file tld_strings.c.
const char * tld_status_to_string | ( | enum tld_status | status | ) |
The status returned in a tld_info can be converted to a string using this function. This is useful to print out an error message.
[in] | status | The status to convert to a string. |
Definition at line 49 of file tld_strings.c.
References TLD_STATUS_DEPRECATED, TLD_STATUS_EXCEPTION, TLD_STATUS_INFRASTRUCTURE, TLD_STATUS_PROPOSED, TLD_STATUS_RESERVED, TLD_STATUS_UNDEFINED, TLD_STATUS_UNUSED, and TLD_STATUS_VALID.
Referenced by tld_file_to_json().
enum tld_category tld_word_to_category | ( | const char * | word, |
int | n | ||
) |
Many times, a simple category is not useful because one TLD may actually be part of multiple groups (i.e. a groups, a country, a language, an entrepreneurial TLD can very well exist!)
The idea is to be backward compatible for anyone who was using the old category value. This function will convert the specified word
in a category. The word is expected to be a non null terminated string, hence the parameter n
to specify its length.
[in] | word | The word to convert. |
[in] | n | The exact number of characters (bytes) in the word. |
Definition at line 103 of file tld_strings.c.
References TLD_CATEGORY_BRAND, TLD_CATEGORY_CONTACT, TLD_CATEGORY_COUNTRY, TLD_CATEGORY_ENTREPRENEURIAL, TLD_CATEGORY_GROUP, TLD_CATEGORY_INTERNATIONAL, TLD_CATEGORY_LANGUAGE, TLD_CATEGORY_LOCATION, TLD_CATEGORY_PROFESSIONALS, TLD_CATEGORY_REGION, TLD_CATEGORY_TECHNICAL, and TLD_CATEGORY_UNDEFINED.
This document is part of the Snap! Websites Project.
Copyright by Made to Order Software Corp.