Java String Indent Format indent(int count)

Here you can find the source of indent(int count)

Description

Create an indentation of a given number of spaces.

License

Open Source License

Parameter

Parameter Description
count a parameter

Return

a string made up of 'count' number of spaces

Declaration

public static String indent(int count) 

Method Source Code

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

public class Main {
    /**/* w  w w  . j a  va2 s.  co m*/
     * Create an indentation of a given number of spaces.
     * @param count
     * @return a string made up of 'count' number of spaces
     */
    public static String indent(int count) {
        StringBuffer buffer = new StringBuffer();
        for (int i = 0; i < count; i++) {
            buffer.append(" ");
        }
        return buffer.toString();
    }
}

Related

  1. indent(final StringBuffer buffer, final String text, final int indent)
  2. indent(final StringBuilder aSb, final String aIndentString)
  3. indent(final StringBuilder buf, int level)
  4. indent(final StringBuilder s, final int depth)
  5. indent(final StringBuilder sb, final int indent)
  6. indent(int i, String s)
  7. indent(int indent)
  8. indent(int indent)
  9. indent(int indent)