:relfileprefix: ../../../ [#boost-urls-ipv4_address-to_string] == xref:boost.adoc[pass:[boost]]::xref:boost/urls.adoc[pass:[urls]]::xref:boost/urls/ipv4_address.adoc[pass:[ipv4_address]]::to_string Return the address as a string in dotted decimal format === Synopsis Declared in header `` [source,cpp,subs="verbatim,macros,-callouts"] ---- 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. [,cpp] ---- assert( ipv4_address(0x01020304).to_string() == "1.2.3.4" ); ---- === Constant. === Strong guarantee. Calls to allocate may throw. String tokens may throw exceptions. * link:https://datatracker.ietf.org/doc/html/rfc4291#section-2.2[ 2.2. Text Representation of Addresses (rfc4291)] === Return Value The return type of the string token. If the token parameter is omitted, then a new `std::string` is returned. Otherwise, the function return type is the result type of the token. === Parameters |=== | Name | Description | *token* | An optional string token. |===