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

Function is_ipv6_address

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

Source from the content-addressed store, hash-verified

16020}
16021
16022bool is_ipv6_address(std::string_view input) noexcept {
16023 // If input's code point length is less than 2, then return false.
16024 if (input.size() < 2) return false;
16025
16026 // Let input code points be input interpreted as a list of code points.
16027 // If input code points[0] is U+005B ([), then return true.
16028 if (input.front() == '[') return true;
16029 // If input code points[0] is U+007B ({) and input code points[1] is U+005B
16030 // ([), then return true.
16031 if (input.starts_with("{[")) return true;
16032 // If input code points[0] is U+005C (\) and input code points[1] is U+005B
16033 // ([), then return true.
16034 return input.starts_with("\\[");
16035}
16036
16037std::string convert_modifier_to_string(url_pattern_part_modifier modifier) {
16038 // TODO: Optimize this.

Callers 1

parse_url_pattern_implFunction · 0.85

Calls 2

frontMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected