Here you can find the source of decodePercent(String str)
String
values.
Parameter | Description |
---|---|
str | the percent encoded <code>String</code> |
public static String decodePercent(String str)
//package com.java2s; import java.io.UnsupportedEncodingException; import java.net.URLDecoder; public class Main { /**/*from ww w . j av a 2 s .c o m*/ * Decode percent encoded <code>String</code> values. * * @param str * the percent encoded <code>String</code> * @return expanded form of the input, for example "foo%20bar" becomes * "foo bar" */ public static String decodePercent(String str) { String decoded = null; try { decoded = URLDecoder.decode(str, "UTF8"); } catch (UnsupportedEncodingException ignored) { } return decoded; } }