QueryParams¶
Parsed query parameters with key-based lookup.
Stores decoded key-value pairs in their original order. Duplicate keys
are preserved — use get() for the first value or get_all() for every
value associated with a key. Lookups are linear scans, which is
appropriate for the small parameter counts typical of query strings.
Constructors¶
create¶
Create from an array of decoded key-value pairs.
Parameters¶
Returns¶
- QueryParams val^
Public Functions¶
apply¶
The pair at index i. Raises an error if out of bounds.
Parameters¶
- i: USize val
Returns¶
get¶
First value for key, or None if the key is absent.
When duplicate keys are possible and all values are needed, use
get_all() instead.
Parameters¶
- key: String val
Returns¶
get_all¶
All values for key, in order. Empty array if absent.
Parameters¶
- key: String val
Returns¶
contains¶
Whether key is present.
Parameters¶
- key: String val
Returns¶
- Bool val
pairs¶
All pairs in their original order.
Returns¶
size¶
Number of pairs, including duplicates.
Returns¶
- USize val