Here you can find the source of unquote(String value)
public static String unquote(String value)
//package com.java2s; /******************************************************************************* * Copyright (c) 2014 Boeing.//ww w .j a va 2 s.c o m * 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: * Boeing - initial API and implementation *******************************************************************************/ public class Main { public static String unquote(String value) { String toReturn = value; if (toReturn != null) { int startAt = 0; int endAt = value.length(); if (toReturn.startsWith("\"") || toReturn.startsWith("'")) { startAt = 1; } if (toReturn.endsWith("\"") || toReturn.endsWith("'")) { endAt = toReturn.length() - 1; } toReturn = toReturn.substring(startAt, endAt); } return toReturn; } }