String indent(String s)
	{
		if (count > 0)
		{ // don't bother indenting if the level is zero
			StringBuilder sb = new StringBuilder();
			sb.append("\n");
			sb.append(getIndentation());
			StringBuilder r = new StringBuilder();
			r.append(getIndentation());
			r.append(s.replaceAll("\n", sb.toString()));
			return r.toString();
		} else
		{
			return s;
		}
	}
String indent ( String s ) { if ( count > 0 ) { StringBuilder sb = new StringBuilder ( ) ; sb . append ( "\n" ) ; sb . append ( getIndentation ( ) ) ; StringBuilder r = new StringBuilder ( ) ; r . append ( getIndentation ( ) ) ; r . append ( s . replaceAll ( "\n" , sb . toString ( ) ) ) ; return r . toString ( ) ; } else { return s ; } }
Indent a string. Inserts an indentation at the beginning of the string. For strings with line breaks, a new
indentation will also be inserted after each line break <b>(including the last)</b>.

@param s
the string to indent
@return the indented string: "  s"