Java String Unquote unquote(String text)

Here you can find the source of unquote(String text)

Description

unquote

License

Open Source License

Declaration

public static String unquote(String text) 

Method Source Code

//package com.java2s;

public class Main {
    private static final char SINGLE_QUOTE = '\'';

    public static String unquote(String text) {
        if (text.length() > 0 && text.charAt(0) == SINGLE_QUOTE && text.charAt(text.length() - 1) == SINGLE_QUOTE) {
            return text.substring(1, text.length() - 1);
        }/*from  w  ww  .  ja va 2  s .  com*/
        return text;
    }
}

Related

  1. unquote(String string)
  2. unquote(String string)
  3. unquote(String string)
  4. unquote(String string)
  5. unquote(String string, char quote)
  6. unquote(String text)
  7. unquote(String text)
  8. unquote(String toUnquote, char quoteChar)
  9. unquote(String val)