Function paramsUrl( baseUrl, nameValuePairs, ... )

Description:
Builds a query-type URL string given a base URL and a list of name, value pairs.

The parameters are encoded on the command line according to the "application/x-www-form-urlencoded" convention, which appends a "?" to the base URL, and then adds name=value pairs separated by "&" characters, with percent-encoding of non-URL-friendly characters. This format is used by many services that require a list of parameters to be conveyed on the URL.

Parameters:
baseUrl (String)
basic URL (may or may not already contain a "?")
nameValuePairs (String, one or more)
an even number of arguments (or an even-length string array) giving parameter name1,value1,name2,value2,...nameN,valueN
Return Value (String):
form-encoded URL
Example:
paramsUrl("http://x.org/", "a", "1", "b", "two", "c", "3&4") = "http://x.org/?a=1&b=two&c=3%264"
Signature:
String paramsUrl(String, String...)