/*
Adds a parameter and value to a URL.
510769
static function addUrlParam($url, $key, $val)
    {
        // Separate the anchor element from the URL if it exists.
        $urlParts = parse_url($url);
        if(isset($urlParts['fragment'])){
            $url = str_replace('#'.$urlParts['fragment'], '', $url);
        }

        $separator = (parse_url($url, PHP_URL_QUERY) == NULL) ? '?' : '&';
        $url .= $separator.$key.'='.$val;

        // Add the anchor back to the URL.
        if(isset($urlParts['fragment'])){
            $url .= '#'.$urlParts['fragment'];
        }

        return $url;
    }
1024970
public WikiParameters addParameter(String key, String value)
    {
        WikiParameters result = new WikiParameters();
        result.fList.addAll(fList);
        result.fList.add(new WikiParameter(key, value));
        return result;
    }
415950
function expand(url, params, variables) {

    var tmpl = parse(url), expanded = tmpl.expand(params);

    if (variables) {
        variables.push.apply(variables, tmpl.vars);
    }

    return expanded;
}
251643
public void addParam(String strParam, boolean bValue)
    {
        this.addParam(strParam, bValue ? Constants.TRUE : Constants.FALSE);
    }
1149972
public void addParamQuery(String name, String value) {
        addParam(name, value, NameValuePair.TYPE_QUERY_STRING);
    }
1028911
final protected function addUrlParam(&$link, $name, $value)
    {
        $base = $name . '=' . $value;

        if (false !== \strpos($link, '?')) {
            $last = \substr($link, -1);

            if ('?' === $last || '&' === $last) {
                $link .= $base;
            } else {
                $link .= '&' . $base;
            }
        } else {
            $link .= '?' . $base;
        }
    }
361648
def addParam(self, paramName, paramValue):
        

        if not paramName:
            raise ValueError('paramName cannot be empty')
        self._params[paramName] = paramValue
767166
public T withParam(String name, String value) {
        parameters.put(name, value);
        return self;
    }
1002613
function addURIParams(uri, params) {
  uri = uri || "";
  params = params || {};

  params = _.clone(params);

  var keys = _.keys(params);

  var separatedPath = uri.split("/");

  separatedPath = _.compact(separatedPath);

  //Replacing Any Path Elements
  separatedPath = _.map(separatedPath, function(pathEntry) {
    if (pathEntry.indexOf(":") !== 0) {
      return pathEntry;
    }

    var key = _.find(keys, function(key) {
      return (":" + key) === pathEntry;
    });

    if (key) {
      return params[key];
    } else {
      return {
        key: pathEntry.substring(1, pathEntry.length),
        error: constants.PROPERTY_NOT_SET
      };
    }
  });

  //If the path contains an invalid parameter, return the error object
  var invalidParameter = _.findWhere(separatedPath, {error: constants.PROPERTY_NOT_SET});

  if (invalidParameter) {
    return invalidParameter;
  }

  var fullPath = "";

  _.each(separatedPath, function(pathElem) {
    return fullPath += "/" + pathElem;
  });

  return fullPath;
}
48901
private void putParameter(String name, String value) {
		String[] params = requestParameters.get(name);
		params = params == null ? new String[] { value } : ArrayUtil.append(params, value);
		requestParameters.put(name, params);
	}
1088998
public static void addParameter(IUrlBuilder urlBuilder, String name, String value) {
        urlBuilder.addParameter(name, value);
    }
1351371
function buildUrl(urlPattern, customParams) {
    var url = formatUrl.apply(null, urlPattern);

    url = appendParams(url, customParams);
    return url;
  }
774428
public B addParameter(final String paramName, final String paramValue) {
        httpParams.addParameter(paramName, paramValue);
        return self();
    }
1303313
public void add(final Param key, final String value) {
        if (StringUtils.isNotBlank(value)) {
            parameters.put(key, value);
        }
    }
1315185
public void addNameUrl(final String name, final String url) 
	throws IOException {
		
		// need to first see if there is already an entry for this name.
		// if not, add url as the value.
		// if so, check the current url locations for name
		//     if url exists, do nothing
		//     if url does not exist, add, and set that as the value.
		
		String newValue = null;
		String oldValue = get(name);
		if(oldValue != null && oldValue.length() > 0) {
			String curUrls[] = oldValue.split(urlDelimiterRE);
			boolean found = false;
			for(int i=0; i < curUrls.length; i++) {
				if(url.equals(curUrls[i])) {
					found = true;
					break;
				}
			}
			if(found == false) {
				newValue = oldValue + " " + url;
			}
		} else {
			// null or empty value
			newValue = url;
			if(oldValue == null) log.addName(name);
		}
		
		// did we find a value?
		if(newValue != null) {
			put(name,newValue);
		}
	}
382116
function append(name, value) {
    validateArgumentsLength(arguments.length, 2);
    var state = getInternalParamsState(this);
    state.entries.push({ key: name + '', value: value + '' });
    if (state.updateURL) state.updateURL();
  }
837785
protected void addURL(final URL url) {
    final URL[] newUrls = new URL[this.urls.length + 1];
    System.arraycopy(url, 0, newUrls, 0, this.urls.length);
    newUrls[this.urls.length] = url;
    this.urls = newUrls;
  }