Syntax: "Labels" separated by '.'. Labels must start and end with a (ASCII) letter or digit, and have as interior characters only letters, digits, and hyphen. Not case sensitive, but canonical form is lower case.
Public Member Functions | |
domain_name () | |
domain_name (const std::string &v) | |
bool | is_null () const |
Test if null. | |
const std::string & | string () const |
domain_name | operator+ (const domain_name &rhs) const |
Append domain name and return result. | |
domain_name & | operator+= (const domain_name &rhs) |
Append domain name to this and return this. | |
Static Public Attributes | |
static const char | SEPARATOR_CHAR |
separator ('.') | |
static const char | char_class [256] |
char class | |
Friends | |
bool URIPP_API | parse (std::string::const_iterator &first, std::string::const_iterator last, domain_name &v) |
uripp::domain_name::domain_name | ( | ) |
Construct null.
uripp::domain_name::domain_name | ( | const std::string & | v | ) |
Construct from string. This will convert to lower case and check for valid chars. Note that the string cannot be empty, it must contain valid chars.
std::invalid_argument | if invalid |
const std::string& uripp::domain_name::string | ( | ) | const [inline] |
Get string.
bool URIPP_API parse | ( | std::string::const_iterator & | first, | |
std::string::const_iterator | last, | |||
domain_name & | v | |||
) | [friend] |
Parse domain name, returning whether found or not and advancing first and setting name if found. Does not skip leading space.