MCPcopy Create free account
hub / github.com/ada-url/ada / process_port

Method process_port

src/url_pattern.cpp:308–317  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

306}
307
308tl::expected<std::string, errors> url_pattern_init::process_port(
309 std::string_view port, std::string_view protocol, process_type type) {
310 // If type is "pattern" then return portValue.
311 if (type == process_type::pattern) {
312 return std::string(port);
313 }
314 // Return the result of running canonicalize a port given portValue and
315 // protocolValue.
316 return url_pattern_helpers::canonicalize_port_with_protocol(port, protocol);
317}
318
319tl::expected<std::string, errors> url_pattern_init::process_pathname(
320 std::string_view value, std::string_view protocol, process_type type) {

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected