Java Utililty Methods String Remove

List of utility methods to do String Remove

Description

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

Method

StringremoveUnusedData(String songData)
remove Unused Data
StringBuilder builder = new StringBuilder();
String split[] = songData.split("\t");
for (int i = 0; i < 54; ++i) {
    if (!bitMap.get(i)) {
        split[i] = GARBAGE;
    builder.append(split[i]);
    builder.append("\t");
...
voidremoveWaitStatus(String nodeInfo)
remove Wait Status
synchronized (nodeSync) {
    nodeStatusMap.remove(nodeInfo);
StringremoveWhitespace(String inputString)
Remove any whitespace (ie., Character.isWhitespace) from the input string.
StringBuffer sb = new StringBuffer();
char[] chars = inputString.toCharArray();
for (int i = 0; i < chars.length; i++) {
    char c = chars[i];
    if (Character.isWhitespace(c)) {
        continue;
    sb.append(c);
...
String[]splitLine(String s, boolean removeNewLine)
split Line
s = normalizeNewLine(s);
StringTokenizer tk = new StringTokenizer(s, "\n", true);
String[] array = new String[tk.countTokens()];
for (int i = 0; i < array.length; i++) {
    array[i] = tk.nextToken();
List<String> list = new ArrayList<>();
for (int i = 0; i < array.length; i++) {
...
StringtrimIndent(String line, int indentsToRemove, int tabWidth, int indentWidth)
Removes the given number of indents from the line.
if (line == null || indentsToRemove <= 0)
    return line;
final int spaceEquivalentsToRemove = indentsToRemove * indentWidth;
int start = 0;
int spaceEquivalents = 0;
int size = line.length();
String prefix = null;
for (int i = 0; i < size; i++) {
...