/** * Extracts a portion of this string builder as a string. * * @param start the start index, inclusive, must be valid * @return the new string * @throws IndexOutOfBoundsException if the index is invalid */ public String substring(int start) { return substring(start, size); }
/** * Extracts a portion of this string builder as a string. * * @param start the start index, inclusive, must be valid * @return the new string * @throws IndexOutOfBoundsException if the index is invalid */ public String substring(int start) { return substring(start, size); }
/** * Extracts a portion of this string builder as a string. * * @param start the start index, inclusive, must be valid * @return the new string * @throws IndexOutOfBoundsException if the index is invalid */ public String substring(int start) { return substring(start, size); }
/** * Extracts a portion of this string builder as a string. * * @param start the start index, inclusive, must be valid * @return the new string * @throws IndexOutOfBoundsException if the index is invalid */ public String substring(int start) { return substring(start, size); }
/** * Extracts a portion of this string builder as a string. * * @param start the start index, inclusive, must be valid * @return the new string * @throws IndexOutOfBoundsException if the index is invalid */ public String substring(int start) { return substring(start, size); }
/** * Extracts a portion of this string builder as a string. * * @param start the start index, inclusive, must be valid * @return the new string * @throws IndexOutOfBoundsException if the index is invalid */ public String substring(int start) { return substring(start, size); }
public List<String> split(String input) { List<String> statements = new ArrayList<String>(); StrBuilder currentSql = new StrBuilder(); StrTokenizer lineTokenizer = new StrTokenizer(input); lineTokenizer.setDelimiterMatcher(StrMatcher.charSetMatcher("\r\n")); for (String line : lineTokenizer.getTokenArray()) { String strippedLine = StringUtils.stripEnd(line, null); if (!currentSql.isEmpty()) { currentSql.append(lineEnding.get()); } currentSql.append(strippedLine); if (delimiterType.matches(strippedLine, delimiter)) { statements.add(currentSql.substring(0, currentSql.length() - delimiter.length())); currentSql.clear(); } } if (!currentSql.isEmpty()) { statements.add(currentSql.toString()); } return statements; }