[#SplitHostPort]
= SplitHostPort
:mrdocs:

Splits socket address string into host string and port value&period; Validates port value&period;

== Synopsis

Declared in `&lt;util&sol;strencodings&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
SplitHostPort(
    std::string&lowbar;view in,
    uint16&lowbar;t& portOut,
    std::string& hostOut);
----

== Return Value

true if port&hyphen;portion is absent or within its allowed range, otherwise false

== Parameters

[cols="1,4"]
|===
| Name| Description
| *in* [in]
| The socket address string to split&period;
| *portOut* [out]
| Port&hyphen;portion of the input, if found and parsable&period;
| *hostOut* [out]
| Host&hyphen;portion of the input, if found&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
