MCPcopy Create free account
hub / github.com/apple/foundationdb / toIPVectorString

Function toIPVectorString

flow/network.cpp:139–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137}
138
139std::string toIPVectorString(const std::vector<uint32_t>& ips) {
140 std::string output;
141 const char* space = "";
142 for (const auto& ip : ips) {
143 output += format("%s%d.%d.%d.%d", space, (ip >> 24) & 0xff, (ip >> 16) & 0xff, (ip >> 8) & 0xff, ip & 0xff);
144 space = " ";
145 }
146 return output;
147}
148
149std::string toIPVectorString(const std::vector<IPAddress>& ips) {
150 std::string output;

Callers 1

Calls 3

formatFunction · 0.70
c_strMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected