5#ifndef ADA_URL_SEARCH_PARAMS_H
6#define ADA_URL_SEARCH_PARAMS_H
21template <
typename T, url_search_params_iter_type Type>
22struct url_search_params_iter;
55 [[nodiscard]]
inline size_t size() const noexcept;
60 inline
void append(std::string_view key, std::string_view value);
65 inline
void remove(std::string_view key);
66 inline
void remove(std::string_view key, std::string_view value);
71 inline std::optional<std::string_view>
get(std::string_view key);
76 inline std::vector<std::
string>
get_all(std::string_view key);
81 inline
bool has(std::string_view key) noexcept;
82 inline
bool has(std::string_view key, std::string_view value) noexcept;
87 inline
void set(std::string_view key, std::string_view value);
129 inline auto
begin()
const {
return params.begin(); }
130 inline auto end()
const {
return params.end(); }
131 inline auto front()
const {
return params.front(); }
132 inline auto back()
const {
return params.back(); }
133 inline auto operator[](
size_t index)
const {
return params[index]; }
141 void reset(std::string_view input);
144 typedef std::pair<std::string, std::string> key_value_pair;
145 std::vector<key_value_pair> params{};
150 void initialize(std::string_view init);
152 template <
typename T, url_search_params_iter_type Type>
162template <
typename T, url_search_params_iter_type Type>
175 inline std::optional<T>
next();
url_search_params_iter_type
std::pair< std::string_view, std::string_view > key_value_view_pair
url_search_params_iter(const url_search_params_iter &u)=default
url_search_params_iter & operator=(url_search_params_iter &&u) noexcept=default
std::optional< T > next()
url_search_params_iter(url_search_params_iter &&u) noexcept=default
~url_search_params_iter()=default
url_search_params_iter & operator=(const url_search_params_iter &u)=default
void set(std::string_view key, std::string_view value)
std::vector< std::string > get_all(std::string_view key)
void remove(std::string_view key)
url_search_params(const url_search_params &u)=default
url_search_params(url_search_params &&u) noexcept=default
auto operator[](size_t index) const
url_search_params_entries_iter get_entries()
url_search_params()=default
std::string to_string() const
url_search_params & operator=(url_search_params &&u) noexcept=default
url_search_params_keys_iter get_keys()
size_t size() const noexcept
url_search_params & operator=(const url_search_params &u)=default
void append(std::string_view key, std::string_view value)
url_search_params(const std::string_view input)
url_search_params_values_iter get_values()
~url_search_params()=default
std::optional< std::string_view > get(std::string_view key)
bool has(std::string_view key) noexcept