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

Method set_hash

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

Source from the content-addressed store, hash-verified

12854}
12855
12856void url::set_hash(const std::string_view input) {
12857 if (input.empty()) {
12858 hash = std::nullopt;
12859 helpers::strip_trailing_spaces_from_opaque_path(*this);
12860 return;
12861 }
12862
12863 std::string new_value;
12864 new_value = input[0] == '#' ? input.substr(1) : input;
12865 helpers::remove_ascii_tab_or_newline(new_value);
12866 hash = unicode::percent_encode(new_value,
12867 ada::character_sets::FRAGMENT_PERCENT_ENCODE);
12868}
12869
12870void url::set_search(const std::string_view input) {
12871 if (input.empty()) {

Callers 3

SetHashMethod · 0.80
canonicalize_hashFunction · 0.80
ada_set_hashFunction · 0.80

Calls 5

percent_encodeFunction · 0.85
overlapsFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected