Here you can find the source of dequoteString(String s)
Parameter | Description |
---|---|
s | a parameter |
public static String dequoteString(String s)
//package com.java2s; /******************************************************************************* * Copyright (c) 2015 CA. All rights reserved. * * This source file is licensed under the terms of the Eclipse Public License 1.0 * For the full text of the EPL please see https://www.eclipse.org/legal/epl-v10.html *******************************************************************************/ public class Main { /**/* www . j a va2 s . co m*/ * dequoteString * @param s * @return */ public static String dequoteString(String s) { String dequoteStr = s.trim(); if (dequoteStr.startsWith("'") && dequoteStr.endsWith("'")) { dequoteStr = dequoteStr.substring(1); dequoteStr = dequoteStr.substring(0, dequoteStr.length() - 1); return dequoteStr; } return s; } }