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

Method process_hash

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

Source from the content-addressed store, hash-verified

15855}
15856
15857tl::expected<std::string, errors> url_pattern_init::process_hash(
15858 std::string_view value, process_type type) {
15859 // Let strippedValue be the given value with a single leading U+0023 (#)
15860 // removed, if any.
15861 if (value.starts_with("#")) {
15862 value.remove_prefix(1);
15863 }
15864 ADA_ASSERT_TRUE(!value.starts_with("#"));
15865 // If type is "pattern" then return strippedValue.
15866 if (type == process_type::pattern) {
15867 return std::string(value);
15868 }
15869 // Return the result of running canonicalize a hash given strippedValue.
15870 return url_pattern_helpers::canonicalize_hash(value);
15871}
15872
15873} // namespace ada
15874

Callers

nothing calls this directly

Calls 1

canonicalize_hashFunction · 0.85

Tested by

no test coverage detected