SearchParams

A struct for managing URL search (query) parameters.

Constructors

this
this(ada_string input)

Constructs a SearchParams instance from a query string.

Destructor

~this
~this()

Destructor that frees the search parameters and associated iterators.

Members

Functions

append
void append(string key, string value)

Appends a key-value pair to the search parameters.

get
ada_string get(string key)

Retrieves the value for a given key.

getAll
Strings getAll(string key)

Retrieves all values for a given key.

has
bool has(string key)

Checks if a key exists in the search parameters.

hasValue
bool hasValue(string key, string value)

Checks if a key-value pair exists in the search parameters.

itNext
ada_string_pair itNext(ada_url_search_params_entries_iter it)

Gets the next key-value pair from a search parameters iterator.

length
size_t length()

Retrieves the number of key-value pairs in the search parameters.

remove
void remove(string key)

Removes all values for a given key.

removeValue
void removeValue(string key, string value)

Removes a specific key-value pair.

reset
void reset()

Resets the search parameters to the original query string.

set
void set(string key, string value)

Sets a key-value pair, replacing any existing values for the key.

sort
void sort()

Sorts the search parameters by key.

toString
ada_owned_string toString()

Converts the search parameters to a string.

Properties

entries
ada_url_search_params_entries_iter entries [@property getter]

Retrieves an iterator for the key-value pairs in the search parameters.

keys
ada_url_search_params_keys_iter keys [@property getter]

Retrieves an iterator for the keys in the search parameters.

values
ada_url_search_params_values_iter values [@property getter]

Retrieves an iterator for the values in the search parameters.

Meta