public static String dequoteFull(String str, int begin, int end, char quote) { // If empty substring, return empty string if (begin == end) { return ""; } // If not quoted, return string if (str.charAt(begin) != quote) { return str.substring(begin, end); } int _end = end - 1; if ((str.length() < 2) || (str.charAt(_end) != quote)) { throw new IllegalArgumentException( "Closing quote missing in string '" + substring(str, begin, end) + "'"); } return dequote(str, begin + 1, _end, quote); }
/** * Removes the surrounding quote and any double quote inside the string <br> * Example:<br> * <pre> * "hello""world" becomes hello"world * </pre> * * @param str input string to dequote * @param quote the quoting char * * @return dequoted String */ public static String dequoteFull(String str, char quote) { if (str == null) { return null; } return dequoteFull(str, 0, str.length(), quote); }
Styles(String rowStyles, String columnStyles) { _rowStyle = (rowStyles == null) ? ArrayUtils.EMPTY_STRING_ARRAY : StringUtils.trim( StringUtils.splitShortString(rowStyles, ',')); _columnStyle = (columnStyles == null) ? ArrayUtils.EMPTY_STRING_ARRAY : StringUtils.trim( StringUtils.splitShortString(columnStyles, ',')); }
quoted ? dequote(str, oldPos + 1, pos - 1, quote) : substring(str, oldPos, pos); list[tokenCount] = dequoteFull(str, oldPos, len, quote);
public static StringBuffer replace( StringBuffer out, String s, String repl, String with) { int lastindex = 0; int len = repl.length(); for (int index = s.indexOf(repl); index >= 0; index = s.indexOf(repl, lastindex = index + len)) { // we have search string at position index out.append(substring(s, lastindex, index)).append(with); } return out.append(substring(s, lastindex, len)); }
public String [] getTargets(FacesContext context) { if (_targets != null) { return StringUtils.splitShortString((String) _targets.getValue(context.getELContext()), ' '); } return org.apache.myfaces.shared_impl.util.ArrayUtils.EMPTY_STRING_ARRAY; }
/** * Undoubles the quotes inside the string <br> Example:<br> * <pre> * hello""world becomes hello"world * </pre> * * @param str input string to dequote * @param quote the quoting char * * @return dequoted string */ public static String dequote(String str, char quote) { // Is there anything to dequote? if (str == null) { return null; } return dequote(str, 0, str.length(), quote); }
quoted ? dequote(str, oldPos + 1, pos - 1, quote) : substring(str, oldPos, pos); list[tokenCount] = dequoteFull(str, oldPos, len, quote);
public static StringBuffer replace( StringBuffer out, String s, String repl, String with) { int lastindex = 0; int len = repl.length(); for (int index = s.indexOf(repl); index >= 0; index = s.indexOf(repl, lastindex = index + len)) { // we have search string at position index out.append(substring(s, lastindex, index)).append(with); } return out.append(substring(s, lastindex, len)); }
public String [] getTargets(FacesContext context) { if (_targets != null) { return StringUtils.splitShortString((String) _targets.getValue(context.getELContext()), ' '); } return org.apache.myfaces.shared_impl.util.ArrayUtils.EMPTY_STRING_ARRAY; }
/** * Undoubles the quotes inside the string <br> Example:<br> * <pre> * hello""world becomes hello"world * </pre> * * @param str input string to dequote * @param quote the quoting char * * @return dequoted string */ public static String dequote(String str, char quote) { // Is there anything to dequote? if (str == null) { return null; } return dequote(str, 0, str.length(), quote); }
Styles(String rowStyles, String columnStyles) { _rowStyle = (rowStyles == null) ? ArrayUtils.EMPTY_STRING_ARRAY : StringUtils.trim( StringUtils.splitShortString(rowStyles, ',')); _columnStyle = (columnStyles == null) ? ArrayUtils.EMPTY_STRING_ARRAY : StringUtils.trim( StringUtils.splitShortString(columnStyles, ',')); }
quoted ? dequote(str, oldPos + 1, pos - 1, quote) : substring(str, oldPos, pos); list[tokenCount] = dequoteFull(str, oldPos, len, quote);
public static String dequoteFull(String str, int begin, int end, char quote) { // If empty substring, return empty string if (begin == end) { return ""; } // If not quoted, return string if (str.charAt(begin) != quote) { return str.substring(begin, end); } int _end = end - 1; if ((str.length() < 2) || (str.charAt(_end) != quote)) { throw new IllegalArgumentException( "Closing quote missing in string '" + substring(str, begin, end) + "'"); } return dequote(str, begin + 1, _end, quote); }
public static StringBuffer replace( StringBuffer out, String s, String repl, String with) { int lastindex = 0; int len = repl.length(); for (int index = s.indexOf(repl); index >= 0; index = s.indexOf(repl, lastindex = index + len)) { // we have search string at position index out.append(substring(s, lastindex, index)).append(with); } return out.append(substring(s, lastindex, len)); }
public String [] getTargets(FacesContext context) { if (_targets != null) { return StringUtils.splitShortString((String) _targets.getValue(context.getELContext()), ' '); } return org.apache.myfaces.shared_impl.util.ArrayUtils.EMPTY_STRING_ARRAY; }
/** * Removes the surrounding quote and any double quote inside the string <br> * Example:<br> * <pre> * "hello""world" becomes hello"world * </pre> * * @param str input string to dequote * @param quote the quoting char * * @return dequoted String */ public static String dequoteFull(String str, char quote) { if (str == null) { return null; } return dequoteFull(str, 0, str.length(), quote); }
/** * Undoubles the quotes inside the string <br> Example:<br> * <pre> * hello""world becomes hello"world * </pre> * * @param str input string to dequote * @param quote the quoting char * * @return dequoted string */ public static String dequote(String str, char quote) { // Is there anything to dequote? if (str == null) { return null; } return dequote(str, 0, str.length(), quote); }
Styles(String rowStyles, String columnStyles) { _rowStyle = (rowStyles == null) ? ArrayUtils.EMPTY_STRING_ARRAY : StringUtils.trim( StringUtils.splitShortString(rowStyles, ',')); _columnStyle = (columnStyles == null) ? ArrayUtils.EMPTY_STRING_ARRAY : StringUtils.trim( StringUtils.splitShortString(columnStyles, ',')); }
public static String dequoteFull(String str, int begin, int end, char quote) { // If empty substring, return empty string if (begin == end) { return ""; } // If not quoted, return string if (str.charAt(begin) != quote) { return str.substring(begin, end); } int _end = end - 1; if ((str.length() < 2) || (str.charAt(_end) != quote)) { throw new IllegalArgumentException( "Closing quote missing in string '" + substring(str, begin, end) + "'"); } return dequote(str, begin + 1, _end, quote); }