build_query
Builds a query string (a=1&b=two) from key-value pairs, percent-encoding both sides.
Pairs keep their order and repeated keys are kept. A space becomes %20 (not +), which every
URL parser reads back correctly. The result has no leading ?. It is the inverse of
parse_query.
Import
Section titled “Import”Cargo feature url (enabled by default). To compile only this module:
or in Cargo.toml:
Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
pairs | I | The keys and values, anything that iterates over (key, value) of string-likes. |
Returns
Section titled “Returns”String — The encoded query string, empty when there are no pairs.
