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

Method process_protocol

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

Source from the content-addressed store, hash-verified

15759}
15760
15761tl::expected<std::string, errors> url_pattern_init::process_protocol(
15762 std::string_view value, process_type type) {
15763 ada_log("process_protocol=", value, " [", type, "]");
15764 // Let strippedValue be the given value with a single trailing U+003A (:)
15765 // removed, if any.
15766 if (value.ends_with(":")) {
15767 value.remove_suffix(1);
15768 }
15769 // If type is "pattern" then return strippedValue.
15770 if (type == process_type::pattern) {
15771 return std::string(value);
15772 }
15773 // Return the result of running canonicalize a protocol given strippedValue.
15774 return url_pattern_helpers::canonicalize_protocol(value);
15775}
15776
15777tl::expected<std::string, errors> url_pattern_init::process_username(
15778 std::string_view value, process_type type) {

Callers

nothing calls this directly

Calls 1

canonicalize_protocolFunction · 0.85

Tested by

no test coverage detected