| 8772 | } |
| 8773 | |
| 8774 | inline void url_search_params::set(const std::string_view key, |
| 8775 | const std::string_view value) { |
| 8776 | const auto find = [&key](const auto ¶m) { 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 | |
| 8789 | inline void url_search_params::remove(const std::string_view key) { |
| 8790 | std::erase_if(params, |