Url-decodes a string.
777236
static String urldecode(final String s) {
		try {
			return URLDecoder.decode(s, CHARSET_NAME);
		} catch (UnsupportedEncodingException e) {
			throw new RuntimeException(e);
		}
	}
1207803
private static Object decodeObject(String text) {
        Object result = null;
        if (text.startsWith("[]"))
            result = HexString.hexToBin(text, 2);
        else
            result = URLDecode(text);
        return result;
    }
222781
function decode(str, keepSlashes) {
            if (isEncoded) {
              str = str.replace(/\uFEFF[0-9]/g, function (str) {
                return encodingLookup[str];
              });
            }

            if (!keepSlashes) {
              str = str.replace(/\\([\'\";:])/g, "$1");
            }

            return str;
          }
357052
public static String decode(String value, Charset charset) {
		try {
			return URLDecoder.decode(value, charset.name());
		}
		catch (UnsupportedEncodingException ex) {
			throw new IllegalArgumentException("Characterset is not supported.");
		}
	}
1281933
def uridecode(uristring, encoding='utf-8', errors='strict'):
    """"""
    if not isinstance(uristring, bytes):
        uristring = uristring.encode(encoding or 'ascii', errors)
    parts = uristring.split(b'%')
    result = [parts[0]]
    append = result.append
    decode = _decoded.get
    for s in parts[1:]:
        append(decode(s[:2], b'%' + s[:2]))
        append(s[2:])
    if encoding is not None:
        return b''.join(result).decode(encoding, errors)
    else:
        return b''.join(result)
843928
public static String decodeUrlPath(String href, String encoding) throws UnsupportedEncodingException {
		if(href.startsWith("tel:")) return href;
		int len = href.length();
		int pos = 0;
		StringBuilder SB = new StringBuilder(href.length()*2); // Leave a little room for encoding
		while(pos<len) {
			int nextPos = StringUtility.indexOf(href, noEncodeCharacters, pos);
			if(nextPos==-1) {
				SB.append(URLDecoder.decode(href.substring(pos, len), encoding));
				pos = len;
			} else {
				SB.append(URLDecoder.decode(href.substring(pos, nextPos), encoding));
				char nextChar = href.charAt(nextPos);
				if(nextChar=='?') {
					// End decoding
					SB.append(href, nextPos, len);
					pos = len;
				} else {
					SB.append(nextChar);
					pos = nextPos+1;
				}
			}
		}
		return SB.toString();
	}
433660
public static String decodeUri(String url)
	{
		int index1 = url.indexOf(sessUrlRewritePrefix);
		int index2 = url.indexOf(qMark);

		String tmp = null;
		if (index2 != -1 && index2 > index1)
		{
			tmp = url.substring(index2);
		}
		if (index1 != -1)
		{
			url = url.substring(0, index1);
			if (tmp != null)
			{
				url = url + tmp;
			}
		}
		return url;
	}
655318
function decode(str) {
  var decoded = 0;

  for (i = 0; i < str.length; i++) {
    decoded = decoded * length + map[str.charAt(i)];
  }

  return decoded;
}
462911
public static function decode($string)
    {
        if (is_array($string)) {
            foreach ($string as $k => $substring) {
                $string[$k] = static::decode($substring);
            }
        } else {
            $string = urldecode($string);
        }

        return $string;
    }
616633
def decode(string):
    
    if not string:
        return bytes()
    elif isinstance(string, str):
        return a2b_base64(string.encode('raw-unicode-escape'))
    else:
        return a2b_base64(string)
839742
public static String decode(String url, String charset) throws UtilException {
		if (StrUtil.isEmpty(url)) {
			return url;
		}
		try {
			return URLDecoder.decode(url, charset);
		} catch (UnsupportedEncodingException e) {
			throw new UtilException(e, "Unsupported encoding: [{}]", charset);
		}
	}
1323115
public static String decodeUrl(String stringToDecode) {
        try {
            return URLDecoder.decode(stringToDecode, "UTF-8");
        } catch (UnsupportedEncodingException e1) {
            throw new RuntimeException(e1);
        }
    }
864494
public static String urlEncode(String str)
    {
        String ret = str;

        try 
        {
            ret = URLEncoder.encode(str, "UTF-8");
        } 
        catch (UnsupportedEncodingException e) 
        {
            logger.severe("Failed to encode value: "+str);
        }

        return ret;
    }
531169
private String encode(String str) {
        if (str == null) {
            return null;
        }
        try {
            return URLEncoder.encode(str, Charsets.UTF_8.name());
        } catch (UnsupportedEncodingException e) {
            // Should never happen
            throw Throwables.propagate(e);
        }
    }
1263192
private String urlEncode(Object value)
	{
		try {
			return URLEncoder.encode(value.toString(), UTF8.name());
		} catch (UnsupportedEncodingException e) { throw new RuntimeException(e); }
	}
846587
@Trivial
    private static String decode(String s) {
        if (s == null) {
            return null;
        }
        return s.replace("%21", "!");
    }
379626
public static String urlEncode(String text)
    {
        String urlEncodedString=text;
        if(text!=null)
        {
            try
            {
                urlEncodedString=URLEncoder.encode(text,SpiUtil.UTF_8_ENCODING_NAME);
            }
            catch(UnsupportedEncodingException exception)
            {
                throw new FaxException("Error while URL encoding text.",exception);
            }
        }
        
        return urlEncodedString;
    }