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

Method to_string

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

Source from the content-addressed store, hash-verified

8751}
8752
8753inline std::string url_search_params::to_string() const {
8754 auto character_set = ada::character_sets::WWW_FORM_URLENCODED_PERCENT_ENCODE;
8755 std::string out{};
8756 for (size_t i = 0; i < params.size(); i++) {
8757 auto key = ada::unicode::percent_encode(params[i].first, character_set);
8758 auto value = ada::unicode::percent_encode(params[i].second, character_set);
8759
8760 // Performance optimization: Move this inside percent_encode.
8761 std::ranges::replace(key, ' ', '+');
8762 std::ranges::replace(value, ' ', '+');
8763
8764 if (i != 0) {
8765 out += "&";
8766 }
8767 out.append(key);
8768 out += "=";
8769 out.append(value);
8770 }
8771 return out;
8772}
8773
8774inline void url_search_params::set(const std::string_view key,
8775 const std::string_view value) {

Callers 6

ToStringMethod · 0.60
ada.hFile · 0.60
clear_searchMethod · 0.60
clear_hashMethod · 0.60
clear_pathnameMethod · 0.60
clear_hostnameMethod · 0.60

Calls 4

percent_encodeFunction · 0.85
replaceFunction · 0.85
appendMethod · 0.65
sizeMethod · 0.45

Tested by

no test coverage detected