Here you can find the source of unescape(String s)
Parameter | Description |
---|---|
s | a parameter |
public static String unescape(String s)
//package com.java2s; /******************************************************************************* * Copyright (c) 2003, 2006 Subclipse project and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors:/*from ww w.j a va 2 s . c o m*/ * Subclipse project committers - initial API and implementation ******************************************************************************/ import java.net.URLDecoder; public class Main { /** * unescape UTF8/URL encoded strings * * @param s * @return */ public static String unescape(String s) { try { return URLDecoder.decode(s, "UTF-8"); } catch (Exception e) { return s; } } }