util
Class Output

java.lang.Object
  extended by util.Output

public final class Output
extends Object

A few utility functions for terminal output formatting.


Field Summary
static int DEFAULT_INDENT
          The width of the default indentation.
 
Method Summary
static String indent(String str)
          Indent each line of a string by DEFAULT_INDENT spaces.
static String indent(String str, int width)
          Indent each line of a string by a given number of spaces.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_INDENT

public static final int DEFAULT_INDENT
The width of the default indentation.

See Also:
Constant Field Values
Method Detail

indent

public static String indent(String str,
                            int width)
Indent each line of a string by a given number of spaces.

Parameters:
str - The string to indent.
width - The width of the indentation.
Returns:
The resulting string.

indent

public static String indent(String str)
Indent each line of a string by DEFAULT_INDENT spaces.

Parameters:
str - The string to indent.
Returns:
The resulting string.