Java String Indent Format indent(int nb)

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

Description

generates a string of nb*" " (four spaces nb times), used for intentation in printAvp

License

Open Source License

Declaration

public static String indent(int nb) 

Method Source Code

//package com.java2s;
/* /*from   w w  w  .  j a  v  a  2s .c om*/
 * Copyright 2012 Devoteam http://www.devoteam.com
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 * 
 * 
 * This file is part of Multi-Protocol Test Suite (MTS).
 * 
 * Multi-Protocol Test Suite (MTS) is free software: you can redistribute
 * it and/or modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation, either version 3 of the
 * License.
 * 
 * Multi-Protocol Test Suite (MTS) is distributed in the hope that it will
 * be useful, but WITHOUT ANY WARRANTY; without even the implied warranty 
 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with Multi-Protocol Test Suite (MTS).
 * If not, see <http://www.gnu.org/licenses/>.
 * 
 */

public class Main {
    /**
     * generates a string of nb*"    " (four spaces nb times), used for intentation in printAvp
     */
    public static String indent(int nb) {
        String str = "";
        for (int i = 0; i < nb; i++) {
            str += "    ";
        }
        return str;
    }
}

Related

  1. indent(int level)
  2. indent(int level)
  3. indent(int level)
  4. indent(int level)
  5. indent(int n)
  6. indent(int nSpaces)
  7. indent(int number)
  8. indent(int numSpaces)
  9. indent(int numSpaces)