MCPcopy Create free account
hub / github.com/NativeScript/android / ipv4

Function ipv4

test-app/runtime/src/main/cpp/ada/ada.cpp:11029–11040  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11027}
11028
11029std::string ipv4(const uint64_t address) noexcept {
11030 std::string output(15, '\0');
11031 char* point = output.data();
11032 char* point_end = output.data() + output.size();
11033 point = std::to_chars(point, point_end, uint8_t(address >> 24)).ptr;
11034 for (int i = 2; i >= 0; i--) {
11035 *point++ = '.';
11036 point = std::to_chars(point, point_end, uint8_t(address >> (i * 8))).ptr;
11037 }
11038 output.resize(point - output.data());
11039 return output;
11040}
11041
11042} // namespace ada::serializers
11043/* end file src/serializers.cpp */

Callers 1

parse_ipv4Method · 0.85

Calls 2

dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected