Java String Unquote unquote(String s)

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

Description

unquote

License

Open Source License

Parameter

Parameter Description
s a parameter

Return

the input string, with quotes removed on either end.

Declaration

public static String unquote(String s) 

Method Source Code

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

public class Main {
    /**//from  w  w w. j  av a  2 s  .c  o m
     * @param s
     * @return the input string, with quotes removed on either end.
     */
    public static String unquote(String s) {
        while (s.startsWith("\"")) {
            s = s.substring(1);
        }

        while (s.endsWith("\"")) {
            s = s.substring(0, s.length() - 1);
        }

        return s;
    }
}

Related

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