Java String Unquote unquote(String s)

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

Description

Remove single or double quotes.

License

Open Source License

Declaration

public static String unquote(String s) 

Method Source Code

//package com.java2s;

public class Main {
    /** Remove single or double quotes.
     *//*from   ww  w .  j  a v a2  s.c o  m*/
    public static String unquote(String s) {
        if ((s.startsWith("\"") && s.endsWith("\"")) || (s.startsWith("'") && s.endsWith("'")))
            s = s.substring(1, s.length() - 1);
        return s;
    }
}

Related

  1. unquote(String name)
  2. unquote(String quoted)
  3. unquote(String quoted)
  4. unquote(String quoted)
  5. unquote(String quotedString)
  6. unquote(String s)
  7. unquote(String s)
  8. unquote(String s)
  9. unquote(String s)