void (StringBuilder result, CharSequence[] lines, int currentLine) { // It looks like regexp usage is too heavy here. if (currentLine != lines.length && !lines[currentLine].toString().matches("\\s*")) { result.append(lines[currentLine]); } }