Android Utililty Methods StringBuilder Remove

List of utility methods to do StringBuilder Remove

Description

The list of methods to do StringBuilder Remove are organized into topic(s).

Method

StringBuilderremoveAll(final StringBuilder s, final Pattern start, final Pattern end)
remove All
while (remove(s, start, end, true) != null)
    ;
return s;
voiddeleteAllIn(StringBuilder sb, String startStr, String endStr)
delete All In
int startIndex = 0;
int endIndex = 0;
while ((startIndex = sb.indexOf(startStr)) >= 0
        && (endIndex = sb.indexOf(endStr)) >= 0) {
    sb.delete(startIndex, endIndex + endStr.length());
voiddeleteAllIn(StringBuilder sb, String startStr, String endStr)
delete All In
int startIndex = 0;
int endIndex = 0;
while ((startIndex = sb.indexOf(startStr)) >= 0
        && (endIndex = sb.indexOf(endStr)) >= 0) {
    sb.delete(startIndex, endIndex + endStr.length());
Stringremove(final StringBuilder s, final Pattern start, final Pattern end, final boolean includeEnd)
remove
final Matcher startMatcher = start.matcher(s);
if (!startMatcher.find()) {
    return null;
final int startIndex = startMatcher.start();
final Matcher endMatcher = end.matcher(s);
endMatcher.region(startMatcher.end(), s.length());
final int endIndex;
...