Java String Unquote unquote(String in)

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

Description

unquote

License

Open Source License

Declaration

public static String unquote(String in) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static String unquote(String in) {
        if (isEmpty(in))
            return in;
        while (in.startsWith("\"") || in.startsWith("'"))
            in = in.substring(1);//from  w w w  .  j a va 2 s  . c  om
        while (in.endsWith("\"") || in.endsWith("'"))
            in = in.substring(0, in.length() - 1);
        return in;
    }

    public static boolean isEmpty(CharSequence cs) {
        return cs == null || cs.length() == 0;
    }

    public static boolean isEmpty(Object[] o) {
        return o == null || o.length == 0;
    }
}

Related

  1. unquote(String _path)
  2. unquote(String argument)
  3. unquote(String argument)
  4. unquote(String aString)
  5. unquote(String entityName)
  6. unquote(String input, char quoteChar)
  7. unquote(String literal)
  8. unquote(String maybeQuoted)
  9. unquote(String message)