Java String Indent Format indent(final int i, StringBuffer b)

Here you can find the source of indent(final int i, StringBuffer b)

Description

indent

License

Open Source License

Declaration

private static void indent(final int i, StringBuffer b) 

Method Source Code

//package com.java2s;

public class Main {
    private static final String SPACES = "                           ";

    private static void indent(final int i, StringBuffer b) {
        if (i > SPACES.length()) {
            b.append(SPACES);/*ww w.jav a  2s.c  o m*/
            indent(i - SPACES.length(), b);
        } else {
            b.append(SPACES.substring(0, i));
        }
    }
}

Related

  1. indent()
  2. indent(char thr, int level)
  3. indent(CharSequence input)
  4. indent(final int depth, final int indentWidth, final StringBuilder buf)
  5. indent(final int indent)
  6. indent(final int indents)
  7. indent(final int size)
  8. indent(final String s)