MCPcopy Create free account
hub / github.com/MonaSolutions/MonaServer / SplitLiteral

Method SplitLiteral

MonaBase/sources/SocketAddress.cpp:268–275  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

266}
267
268UInt16 SocketAddress::SplitLiteral(const char* value,string& host) {
269 UInt16 port(0);
270 host.assign(value);
271 const char* colon(strchr(value,':'));
272 if (colon && String::ToNumber(colon+1, port)) // check if it's really a marker port colon (could be a IPv6 colon)
273 host.resize(colon-value);
274 return port;
275}
276
277} // namespace Mona

Callers

nothing calls this directly

Calls 1

resizeMethod · 0.80

Tested by

no test coverage detected