we have std::string A with tcp://adr:port/ How to parse it into address std::string and one int for port?
A
tcp://adr:port/
Nowadays one may also meet IPv6 addresses with a host part that already contains a variable number of colons and dots. Splitting URL's then should be done following RFC3986. See wikipedia IPv6