Here you can find the source of indent(StringBuilder builder, int indent)
Parameter | Description |
---|---|
builder | builder to indent |
indent | amount of indent |
public static StringBuilder indent(StringBuilder builder, int indent)
//package com.java2s; //License from project: Open Source License public class Main { /**//from w ww . ja v a 2 s . c o m * Indent string. */ public static final String INDENT = " "; /** * Adds indent to builder. * * @param builder builder to indent * @param indent amount of indent * @return builder */ public static StringBuilder indent(StringBuilder builder, int indent) { while (0 < indent) { builder.append(INDENT); indent--; } return builder; } }