Syntax: Note that leading 0's are not valid.
IPv4address = dec-octet "." dec-octet "." dec-octet "." dec-octet dec-octet = DIGIT ; 0-9 | %x31-39 DIGIT ; 10-99 | "1" 2DIGIT ; 100-199 | "2" %x30-34 DIGIT ; 200-249 | "25" %x30-35 ; 250-255
Public Member Functions | |
ip_address () | |
ip_address (const std::string &v) | |
bool | is_null () const |
Test if null (all 0's). | |
std::string | string () const |
Calculate string. | |
std::ostream & | operator<< (std::ostream &os) const |
Stream out. | |
Static Public Attributes | |
static const char | SEPARATOR_CHAR |
separator ('.') | |
Friends | |
bool URIPP_API | parse (std::string::const_iterator &first, std::string::const_iterator last, ip_address &v) |
bool URIPP_API | parse (std::string::const_iterator &first, std::string::const_iterator last, ipv6_address &v) |
uripp::ip_address::ip_address | ( | ) |
Construct null.
uripp::ip_address::ip_address | ( | const std::string & | v | ) |
Construct from string. Note that the string cannot be empty, it must contain valid chars.
std::invalid_argument | if invalid |
bool URIPP_API parse | ( | std::string::const_iterator & | first, | |
std::string::const_iterator | last, | |||
ipv6_address & | v | |||
) | [friend] |
Parse IP v6 address, returning whether found or not and advancing first and setting address if found. Does not skip leading space.
bool URIPP_API parse | ( | std::string::const_iterator & | first, | |
std::string::const_iterator | last, | |||
ip_address & | v | |||
) | [friend] |
Parse IP address, returning whether found or not and advancing first and setting address if found. Does not skip leading space.