Java String Indent Format indent(int indent, int tab, String string)

Here you can find the source of indent(int indent, int tab, String string)

Description

indent

License

Open Source License

Parameter

Parameter Description
indent a parameter
tab a parameter
string a parameter

Declaration


public static String indent(int indent, int tab, String string) 

Method Source Code

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

public class Main {
    /**/*from  w w w .j  a  va2 s .co m*/
      * @param indent
      * @param tab
      * @param string
      * @return
      */
    /*@
      @ public behavior
      @*/
    public static String indent(int indent, int tab, String string) {
        StringBuffer result = new StringBuffer();
        for (int i = 0; i < indent * tab; i++) {
            result.append(' ');
        }
        result.append(string);
        return result.toString();
    }
}

Related

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