/** * Deletes all parts of the builder that the matcher matches. * <p> * Matchers can be used to perform advanced deletion behaviour. * For example you could write a matcher to delete all occurances * where the character 'a' is followed by a number. * * @param matcher the matcher to use to find the deletion, null causes no action * @return this, to enable chaining */ public StrBuilder deleteAll(StrMatcher matcher) { return replace(matcher, null, 0, size, -1); }
/** * Deletes the first match within the builder using the specified matcher. * <p> * Matchers can be used to perform advanced deletion behaviour. * For example you could write a matcher to delete * where the character 'a' is followed by a number. * * @param matcher the matcher to use to find the deletion, null causes no action * @return this, to enable chaining */ public StrBuilder deleteFirst(StrMatcher matcher) { return replace(matcher, null, 0, size, 1); }
/** * Replaces all matches within the builder with the replace string. * <p> * Matchers can be used to perform advanced replace behaviour. * For example you could write a matcher to replace all occurances * where the character 'a' is followed by a number. * * @param matcher the matcher to use to find the deletion, null causes no action * @param replaceStr the replace string, null is equivalent to an empty string * @return this, to enable chaining */ public StrBuilder replaceAll(StrMatcher matcher, String replaceStr) { return replace(matcher, replaceStr, 0, size, -1); }
/** * Replaces the first match within the builder with the replace string. * <p> * Matchers can be used to perform advanced replace behaviour. * For example you could write a matcher to replace * where the character 'a' is followed by a number. * * @param matcher the matcher to use to find the deletion, null causes no action * @param replaceStr the replace string, null is equivalent to an empty string * @return this, to enable chaining */ public StrBuilder replaceFirst(StrMatcher matcher, String replaceStr) { return replace(matcher, replaceStr, 0, size, 1); }
private static String removeEnclosure( String stringToSplit, String enclosure ) { int firstIndex = stringToSplit.indexOf( enclosure ); int lastIndex = stringToSplit.lastIndexOf( enclosure ); if ( firstIndex == lastIndex ) { return stringToSplit; } StrBuilder strBuilder = new StrBuilder( stringToSplit ); strBuilder.replace( firstIndex, enclosure.length() + firstIndex, "" ); strBuilder.replace( lastIndex - enclosure.length(), lastIndex, "" ); return strBuilder.toString(); }
for (Pair<Integer, Integer> pos : tablesPos) { String tableWithSchema = schema + "." + inputSql.substring(pos.getFirst(), pos.getSecond()); afterConvert.replace(pos.getFirst(), pos.getSecond(), tableWithSchema);
buf.replace(startPos, endPos, varValue); altered = true; int change = substitute(buf, startPos,
/** * Deletes the first match within the builder using the specified matcher. * <p> * Matchers can be used to perform advanced deletion behaviour. * For example you could write a matcher to delete * where the character 'a' is followed by a number. * * @param matcher the matcher to use to find the deletion, null causes no action * @return this, to enable chaining */ public StrBuilder deleteFirst(StrMatcher matcher) { return replace(matcher, null, 0, size, 1); }
/** * Deletes all parts of the builder that the matcher matches. * <p> * Matchers can be used to perform advanced deletion behaviour. * For example you could write a matcher to delete all occurances * where the character 'a' is followed by a number. * * @param matcher the matcher to use to find the deletion, null causes no action * @return this, to enable chaining */ public StrBuilder deleteAll(StrMatcher matcher) { return replace(matcher, null, 0, size, -1); }
/** * Deletes all parts of the builder that the matcher matches. * <p> * Matchers can be used to perform advanced deletion behaviour. * For example you could write a matcher to delete all occurances * where the character 'a' is followed by a number. * * @param matcher the matcher to use to find the deletion, null causes no action * @return this, to enable chaining */ public StrBuilder deleteAll(StrMatcher matcher) { return replace(matcher, null, 0, size, -1); }
/** * Deletes all parts of the builder that the matcher matches. * <p> * Matchers can be used to perform advanced deletion behaviour. * For example you could write a matcher to delete all occurances * where the character 'a' is followed by a number. * * @param matcher the matcher to use to find the deletion, null causes no action * @return this, to enable chaining */ public StrBuilder deleteAll(StrMatcher matcher) { return replace(matcher, null, 0, size, -1); }
/** * Deletes the first match within the builder using the specified matcher. * <p> * Matchers can be used to perform advanced deletion behaviour. * For example you could write a matcher to delete * where the character 'a' is followed by a number. * * @param matcher the matcher to use to find the deletion, null causes no action * @return this, to enable chaining */ public StrBuilder deleteFirst(StrMatcher matcher) { return replace(matcher, null, 0, size, 1); }
/** * Deletes the first match within the builder using the specified matcher. * <p> * Matchers can be used to perform advanced deletion behaviour. * For example you could write a matcher to delete * where the character 'a' is followed by a number. * * @param matcher the matcher to use to find the deletion, null causes no action * @return this, to enable chaining */ public StrBuilder deleteFirst(StrMatcher matcher) { return replace(matcher, null, 0, size, 1); }
/** * Deletes the first match within the builder using the specified matcher. * <p> * Matchers can be used to perform advanced deletion behaviour. * For example you could write a matcher to delete * where the character 'a' is followed by a number. * * @param matcher the matcher to use to find the deletion, null causes no action * @return this, to enable chaining */ public StrBuilder deleteFirst(StrMatcher matcher) { return replace(matcher, null, 0, size, 1); }
/** * Deletes all parts of the builder that the matcher matches. * <p> * Matchers can be used to perform advanced deletion behaviour. * For example you could write a matcher to delete all occurances * where the character 'a' is followed by a number. * * @param matcher the matcher to use to find the deletion, null causes no action * @return this, to enable chaining */ public StrBuilder deleteAll(StrMatcher matcher) { return replace(matcher, null, 0, size, -1); }
/** * Deletes all parts of the builder that the matcher matches. * <p> * Matchers can be used to perform advanced deletion behaviour. * For example you could write a matcher to delete all occurances * where the character 'a' is followed by a number. * * @param matcher the matcher to use to find the deletion, null causes no action * @return this, to enable chaining */ public StrBuilder deleteAll(StrMatcher matcher) { return replace(matcher, null, 0, size, -1); }
/** * Deletes the first match within the builder using the specified matcher. * <p> * Matchers can be used to perform advanced deletion behaviour. * For example you could write a matcher to delete * where the character 'a' is followed by a number. * * @param matcher the matcher to use to find the deletion, null causes no action * @return this, to enable chaining */ public StrBuilder deleteFirst(StrMatcher matcher) { return replace(matcher, null, 0, size, 1); }
/** * Replaces the first match within the builder with the replace string. * <p> * Matchers can be used to perform advanced replace behaviour. * For example you could write a matcher to replace * where the character 'a' is followed by a number. * * @param matcher the matcher to use to find the deletion, null causes no action * @param replaceStr the replace string, null is equivalent to an empty string * @return this, to enable chaining */ public StrBuilder replaceFirst(StrMatcher matcher, String replaceStr) { return replace(matcher, replaceStr, 0, size, 1); }
/** * Replaces all matches within the builder with the replace string. * <p> * Matchers can be used to perform advanced replace behaviour. * For example you could write a matcher to replace all occurances * where the character 'a' is followed by a number. * * @param matcher the matcher to use to find the deletion, null causes no action * @param replaceStr the replace string, null is equivalent to an empty string * @return this, to enable chaining */ public StrBuilder replaceAll(StrMatcher matcher, String replaceStr) { return replace(matcher, replaceStr, 0, size, -1); }
/** * Replaces the first match within the builder with the replace string. * <p> * Matchers can be used to perform advanced replace behaviour. * For example you could write a matcher to replace * where the character 'a' is followed by a number. * * @param matcher the matcher to use to find the deletion, null causes no action * @param replaceStr the replace string, null is equivalent to an empty string * @return this, to enable chaining */ public StrBuilder replaceFirst(StrMatcher matcher, String replaceStr) { return replace(matcher, replaceStr, 0, size, 1); }