[#8AE9EA46602740D74608042E3C4796AC5E282933]

Function ipv4_address:: to_string

Return the address as a string in dotted decimal format

Synopsis

            template
StringToken::result_type
to_string(StringToken&& token) const;
        

Description

When called with no arguments, the return type is `std::string`. Otherwise, the return type and style of output is determined by which string token is passed.

Example

assert( ipv4_address(0x01020304).to_string() == "1.2.3.4" );

Complexity

Constant.

Exception Safety

Strong guarantee. Calls to allocate may throw. String tokens may throw exceptions.

Specification

  • 2.2. Text Representation of Addresses (rfc4291)