| 16020 | } |
| 16021 | |
| 16022 | bool 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 | |
| 16037 | std::string convert_modifier_to_string(url_pattern_part_modifier modifier) { |
| 16038 | // TODO: Optimize this. |
no test coverage detected