Java String Indent Format indent(int indent)

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

Description

Return some indentation.

License

Apache License

Declaration

public static String indent(int indent) 

Method Source Code

//package com.java2s;
// Licensed under the Apache License, Version 2.0 (the "License");

public class Main {
    private static final String tabs = "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t";
    private static final int tabsLen = tabs.length();

    /*********************************************************************
     * Return some indentation./*from w w  w . j a v  a 2 s  .  c  o m*/
     ********************************************************************/
    public static String indent(int indent) {
        if (indent < 1 || indent > tabsLen)
            return "";
        return tabs.substring(0, indent);
    }
}

Related

  1. indent(int count)
  2. indent(int i, String s)
  3. indent(int indent)
  4. indent(int indent)
  5. indent(int indent)
  6. indent(int indent, int tab, String string)
  7. indent(int indent, StringBuffer sb)
  8. indent(int indentLevel)
  9. indent(int level)