List of utility methods to do String Indent Format
String | indent(int nSpaces) For tree dumper. return SPACES.substring(0, nSpaces);
|
String | indent(int number) indent StringBuffer result = new StringBuffer(); for (int i = 0; i < number; i++) { result.append(SPACE); return result.toString(); |
String | indent(int numSpaces) indent StringBuffer buffer = new StringBuffer(); for (int i = 0; i < numSpaces; ++i) buffer.append(" "); return buffer.toString(); |
void | indent(int numSpaces) indent indentWith(spaces.substring(0, numSpaces)); |
String | indent(int tabCount) indent String s = new String(); for (int i = 0; i < tabCount; ++i) { s = s + '\t'; return s; |
String | indent(String in) indent return indent(in, "\t"); |
String | indent(String in) indent StringBuilder sb = new StringBuilder(in); sb.insert(0, " "); for (int i = 0; i < sb.length(); i++) { char c = sb.charAt(i); if (c == '\n') { sb.insert(i + 1, " "); return sb.toString(); |
String | indent(String input, int depth, int start) Helper method used to indent text. String[] text = stringToArray(input); for (int i = start; i < text.length; i++) { text[i] = printNTimes(" ", depth) + text[i]; return arrayToString(text); |
String | indent(String lines, String indentation) Prepends the String indentation to every line in String lines , including a possibly non-empty line following the final newline. if (lines.length() == 0) { return lines; final String newLine = "\n"; if (lines.endsWith(newLine)) { return indentation + (lines.substring(0, lines.length() - 1)).replace(newLine, newLine + indentation) + newLine; return indentation + lines.replace(newLine, newLine + indentation); |
String | indent(String message, int indent) Method which adds a specified amount of tabs to the message string. String temp = ""; for (int i = 0; i < indent; i++) temp = temp + "\t"; return temp + message; |