Here you can find the source of unquote(String s)
Parameter | Description |
---|---|
s | a parameter |
public static String unquote(String s)
//package com.java2s; /** /*from w w w .j a v a 2 s.co m*/ * Copyright (c) 2012 by JP Moresmau * This code is made available under the terms of the Eclipse Public License, * version 1.0 (EPL). See http://www.eclipse.org/legal/epl-v10.html */ public class Main { /** * remove double quotes around a string * @param s * @return */ public static String unquote(String s) { if (s != null && s.length() > 1) { if (s.charAt(0) == '\"' && s.charAt(s.length() - 1) == '\"') { s = s.substring(1, s.length() - 1); } } return s; } }