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

Method set

test-app/runtime/src/main/cpp/ada/ada.h:8774–8787  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8772}
8773
8774inline void url_search_params::set(const std::string_view key,
8775 const std::string_view value) {
8776 const auto find = [&key](const auto &param) { return param.first == key; };
8777
8778 auto it = std::ranges::find_if(params, find);
8779
8780 if (it == params.end()) {
8781 params.emplace_back(key, value);
8782 } else {
8783 it->second = value;
8784 params.erase(std::remove_if(std::next(it), params.end(), find),
8785 params.end());
8786 }
8787}
8788
8789inline void url_search_params::remove(const std::string_view key) {
8790 std::erase_if(params,

Callers 4

waitForDebuggerMethod · 0.45
SetMethod · 0.45
ada_search_params_setFunction · 0.45

Calls 3

emplace_backMethod · 0.80
eraseMethod · 0.80
endMethod · 0.45

Tested by 1

waitForDebuggerMethod · 0.36