Java String Unquote unquote(String str)

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

Description

unquote

License

Open Source License

Declaration

public static final String unquote(String str) 

Method Source Code

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

public class Main {
    public static final String unquote(String str) {
        if (str.length() >= 2) {
            if (str.startsWith("'") && str.endsWith("'")) {
                str = str.substring(1, str.length() - 1);
            } else if (str.startsWith("\"") && str.endsWith("\"")) {
                str = str.substring(1, str.length() - 1);
            }// w w  w  . java 2s  .  c o m
        }
        return str;
    }
}

Related

  1. unquote(String str)
  2. unquote(String str)
  3. unquote(String str)
  4. unquote(String str)
  5. unquote(String str)
  6. unquote(String string)
  7. unquote(String string)
  8. unquote(String string)
  9. unquote(String string)