List of utility methods to do String Indent Format
String | indent() indent String partial = ""; for (int i = 0; i < loggingIndentation; i++) partial = partial + " "; return partial; |
void | indent(char thr, int level) indent System.out.print(thr + " "); for (int i = 0; i < level; i++) System.out.print(" "); |
StringBuilder | indent(CharSequence input) Indent a String. return indent(input, " ", 1, 1); |
void | indent(final int depth, final int indentWidth, final StringBuilder buf) Indent (depth * indentWidth) spaces. final int maxIndent = INDENT_LEVELS.length - 1; for (int d = depth * indentWidth; d > 0;) { final int n = Math.min(d, maxIndent); buf.append(INDENT_LEVELS[n]); d -= n; |
void | indent(final int i, StringBuffer b) indent if (i > SPACES.length()) { b.append(SPACES); indent(i - SPACES.length(), b); } else { b.append(SPACES.substring(0, i)); |
String | indent(final int indent) Creates a string with the specified level of indentation final StringBuilder builder = new StringBuilder(); for (int i = 0; i < indent; i++) { builder.append(INDENT); return builder.toString(); |
String | indent(final int indents) indent return indent(indents, 4);
|
String | indent(final int size) indent String indent = ""; for (int i = 1; i <= size; i++) { indent += " "; return indent; |
String | indent(final String s) indent if (s.isEmpty()) { return s; return TAB + s.replaceAll("(\\r\\n|\\r|\\n)(.+)", "$1" + TAB + "$2"); |
String | indent(final String string, final String separator) indent final String t1 = "T1[" + string.hashCode() + "]"; final String t2 = "T2[" + string.hashCode() + "]"; final String r1 = string.replace("\r\n", t1 + separator); final String r2 = r1.replace("\n", t2 + separator); final String r3 = r2.replace(t1, "\r\n"); return r3.replace(t2, "\n"); |