|
Ada 3.4.4
Fast spec-compliant URL parser
|
Class for parsing and manipulating URL query strings. More...
#include <url_search_params.h>
Friends | |
| template<typename T , url_search_params_iter_type Type> | |
| struct | url_search_params_iter |
Class for parsing and manipulating URL query strings.
The url_search_params class provides methods to parse, modify, and serialize URL query parameters (the part after '?' in a URL). It handles percent-encoding and decoding automatically.
All string inputs must be valid UTF-8. The caller is responsible for ensuring UTF-8 validity.
Definition at line 60 of file url_search_params.h.
|
default |
|
inlineexplicit |
Constructs url_search_params by parsing a query string.
| input | A query string (with or without leading '?'). Must be UTF-8. |
Definition at line 67 of file url_search_params.h.
References ada::parse().
|
default |
|
defaultnoexcept |
|
default |
|
inline |
Appends a new key-value pair to the parameter list.
| key | The parameter name (must be valid UTF-8). |
| value | The parameter value (must be valid UTF-8). |
Definition at line 70 of file url_search_params-inl.h.
|
inline |
Definition at line 187 of file url_search_params.h.
|
inline |
C++ style conventional iterator support. const only because we do not really want the params to be modified via the iterator.
Definition at line 184 of file url_search_params.h.
|
inline |
Definition at line 185 of file url_search_params.h.
|
inline |
Definition at line 186 of file url_search_params.h.
|
inline |
Returns the value of the first pair with the given key.
| key | The parameter name to search for. |
Definition at line 77 of file url_search_params-inl.h.
References ada::parse().
|
inline |
Returns all values for pairs with the given key.
| key | The parameter name to search for. |
Definition at line 89 of file url_search_params-inl.h.
References ada::parse().
|
inline |
Returns an iterator over all key-value pairs.
Definition at line 258 of file url_search_params-inl.h.
|
inline |
Returns an iterator over all parameter keys. Keys may repeat if there are duplicate parameters.
Definition at line 244 of file url_search_params-inl.h.
|
inline |
Returns an iterator over all parameter values.
Definition at line 251 of file url_search_params-inl.h.
|
inlinenoexcept |
Checks if any pair has the given key.
| key | The parameter name to search for. |
true if at least one pair has this key. Definition at line 102 of file url_search_params-inl.h.
References ada::parse().
|
inlinenoexcept |
Checks if any pair matches the given key and value.
| key | The parameter name to search for. |
| value | The parameter value to match. |
true if a matching pair exists. Definition at line 108 of file url_search_params-inl.h.
References ada::parse().
|
default |
|
defaultnoexcept |
Definition at line 188 of file url_search_params.h.
|
inline |
Removes all pairs with the given key.
| key | The parameter name to remove. |
Definition at line 152 of file url_search_params-inl.h.
References ada::parse().
|
inline |
Removes all pairs with the given key and value.
| key | The parameter name. |
| value | The parameter value to match. |
Definition at line 157 of file url_search_params-inl.h.
References ada::parse().
|
inline |
Sets a parameter value, replacing any existing pairs with the same key.
| key | The parameter name (must be valid UTF-8). |
| value | The parameter value (must be valid UTF-8). |
Definition at line 137 of file url_search_params-inl.h.
References ada::parse().
|
inlinenoexcept |
Returns the number of key-value pairs.
Definition at line 75 of file url_search_params-inl.h.
Referenced by ada::url_search_params_iter< T, Type >::has_next(), and LLVMFuzzerTestOneInput().
|
inline |
Sorts all key-value pairs by their keys using code unit comparison.
Definition at line 164 of file url_search_params-inl.h.
References ada::parse().
|
inline |
Serializes the parameters to a query string (without leading '?').
Definition at line 116 of file url_search_params-inl.h.
References ada::parse(), and ada::character_sets::WWW_FORM_URLENCODED_PERCENT_ENCODE.
|
friend |
Definition at line 209 of file url_search_params.h.