Java String Indent Format indent(final int indents)

Here you can find the source of indent(final int indents)

Description

indent

License

Open Source License

Declaration

public static String indent(final int indents) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static String indent(final int indents) {

        return indent(indents, 4);
    }/*from  ww  w  . j  av a2s.c  o  m*/

    public static String indent(final int indents, final int size) {

        StringBuilder indent = new StringBuilder(indents * size);
        for (int i = 0; i < indents * size; i++)
            indent.append(' ');

        return indent.toString();
    }

    public static String indent(final int indents, final int size, final String message) {

        return indent(indents, size) + message;
    }
}

Related

  1. indent(char thr, int level)
  2. indent(CharSequence input)
  3. indent(final int depth, final int indentWidth, final StringBuilder buf)
  4. indent(final int i, StringBuffer b)
  5. indent(final int indent)
  6. indent(final int size)
  7. indent(final String s)
  8. indent(final String string, final String separator)
  9. indent(final StringBuffer buffer, final String text, final int indent)