awwx.ws

encodequery0

generate the query portion of a URL

http://awwx.ws/encodequery0.arc:

(def encodequery (kvs)
  (tostring
   (between (k v) kvs (pr "&")
     (pr k "=" (urlencode:string v)))))

Example

arc> (encodequery '((a "0 = 1 & 0") (b "foo")))
"a=0+%3D+1+%26+0&b=foo"

License

Same as Arc.

Contact me

Twitter: awwx
Email: andrew.wilcox [at] gmail.com