1 19 20 package org.netbeans.modules.j2ee.persistence.editor.completion; 21 22 26 public class Utils { 27 28 public static String unquote(String quoted) { 29 if (quoted == null || quoted.length() <= 0) { 30 return quoted; 31 } 32 int start = 0; 33 int end = quoted.length(); 34 if (quoted.charAt(0) == '\"') { 35 start++; 36 } 37 if (quoted.charAt(end - 1) == '\"') { 38 end--; 39 } 40 if (start < end) { 41 return quoted.substring(start, end); 42 } else { 43 return ""; } 45 } 46 47 } 48 | Popular Tags |