Throughout this module, the empty string and nil are interchangeable. Use str or seq wherever a concrete type is required.
Throughout this module, the empty string and nil are interchangeable. Use str or seq wherever a concrete type is required.
(decode string)
URL-decode string
. Uses UTF-8 as the encoding if applicable.
URL-decode `string`. Uses UTF-8 as the encoding if applicable.
(encode string)
URL-encode string
; other implementations sometimes convert '+' to '%20',
but this method does not. Uses UTF-8 as the encoding if applicable.
URL-encode `string`; other implementations sometimes convert '+' to '%20', but this method does not. Uses UTF-8 as the encoding if applicable.
(map->search m)
(map->search m {:keys [separator]})
Serialize a map of name-vector tuples back into a string (prefixed with '?' if non-empty)
Serialize a map of name-vector tuples back into a string (prefixed with '?' if non-empty)
(search->map search)
(search->map search {re :split})
Run search->seq then convert to a map with string keys and vector values
Run search->seq then convert to a map with string keys and vector values
(search->seq search)
Convert a query string, like that returned by window.location.search, to a seq of key-value tuples.
search input | result | description |
---|---|---|
"" | nil | No querystring |
"?" | () | Empty querystring |
"?a=1&b=2" | (["a" "1"] ["b" "2"]) | Two normal query parameters |
Convert a query string, like that returned by window.location.search, to a seq of key-value tuples. | `search` input | result | description | |:---------------|:-------|:------------| | "" | nil | No querystring | "?" | () | Empty querystring | "?a=1&b=2" | (["a" "1"] ["b" "2"]) | Two normal query parameters
(seq->search kvs)
Serialize a seq of key-value tuples back into a string
Serialize a seq of key-value tuples back into a string
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close