/** * Create an iterator of the input string, breaking apart the string at the provided delimiters, removing quotes and triming the parts of the string as * needed. * * @param str * the input string to split apart * @param delims * the delimiter characters to split the string on * @return the iterator of the parts of the string, trimmed, with quotes around the string part removed, and unescaped */ public static Iterator<String> splitAt(String str, String delims) { return new DeQuotingStringIterator(str.trim(),delims); }
@Override public String next() { if (!hasNext()) { throw new NoSuchElementException(); } String ret = token.toString(); token.setLength(0); hasToken = false; return QuoteUtil.dequote(ret.trim()); }
appendToken(c); appendToken(c); appendToken(c); state = State.TOKEN; debug("hasNext/t: %b [%s]%n",hasToken,token); return hasToken; appendToken(c); break; appendToken(c); appendToken(c); state = State.TOKEN; appendToken(c); appendToken(c); appendToken(c); state = State.TOKEN; appendToken(c); debug("%s <%s> : [%s]%n",state,c,token);
appendToken(c); appendToken(c); appendToken(c); state = State.TOKEN; debug("hasNext/t: %b [%s]%n",hasToken,token); return hasToken; appendToken(c); break; appendToken(c); appendToken(c); state = State.TOKEN; appendToken(c); appendToken(c); appendToken(c); state = State.TOKEN; appendToken(c); debug("%s <%s> : [%s]%n",state,c,token);
appendToken(c); appendToken(c); appendToken(c); state = State.TOKEN; appendToken(c); break; appendToken(c); appendToken(c); state = State.TOKEN; appendToken(c); appendToken(c); appendToken(c); state = State.TOKEN; appendToken(c);
/** * Create an iterator of the input string, breaking apart the string at the provided delimiters, removing quotes and triming the parts of the string as * needed. * * @param str * the input string to split apart * @param delims * the delimiter characters to split the string on * @return the iterator of the parts of the string, trimmed, with quotes around the string part removed, and unescaped */ public static Iterator<String> splitAt(String str, String delims) { return new DeQuotingStringIterator(str.trim(),delims); }
/** * Create an iterator of the input string, breaking apart the string at the provided delimiters, removing quotes and triming the parts of the string as * needed. * * @param str * the input string to split apart * @param delims * the delimiter characters to split the string on * @return the iterator of the parts of the string, trimmed, with quotes around the string part removed, and unescaped */ public static Iterator<String> splitAt(String str, String delims) { return new DeQuotingStringIterator(str.trim(),delims); }
@Override public String next() { if (!hasNext()) { throw new NoSuchElementException(); } String ret = token.toString(); token.setLength(0); hasToken = false; return QuoteUtil.dequote(ret.trim()); }
@Override public String next() { if (!hasNext()) { throw new NoSuchElementException(); } String ret = token.toString(); token.setLength(0); hasToken = false; return QuoteUtil.dequote(ret.trim()); }