Here you can find the source of unquote(String value)
public static String unquote(String value)
//package com.java2s; //License from project: Apache License public class Main { public static String unquote(String value) { if (value.startsWith("\"") && value.endsWith("\"")) { return pinch(value, 1); } else if (value.startsWith("'") && value.endsWith("'")) { return pinch(value, 1); } else {//from w w w.java 2s . com return value; } } /** * Take a number of chars from the start and end and return the middle string * * @param string * @param i * @return */ public static String pinch(String string, int chars) { return string.substring(chars, string.length() - chars); } }