Here you can find the source of indent(StringBuilder buffer, int d)
Parameter | Description |
---|---|
buffer | the buffer. |
d | number of spaces. |
public static StringBuilder indent(StringBuilder buffer, int d)
//package com.java2s; public class Main { /**/*ww w .ja v a 2s . c om*/ * Appends the specified number of space charcter to a string buffer and returns it. * * @param buffer the buffer. * @param d number of spaces. * @return the buffer. */ public static StringBuilder indent(StringBuilder buffer, int d) { for (int i = 0; i < d; i++) { buffer.append(' '); } return buffer; } }