public abstract class LineUtil
extends java.lang.Object
Constructor and Description |
---|
LineUtil() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
reflowLine(java.lang.String line)
Reformats a line so that it fits in 78 characters max.
|
static java.lang.String |
reformatLine(java.lang.String format,
java.lang.Object... params)
Formats the string using
String.format(String, Object...)
and then returns the result of reflowLine(String) . |
public static java.lang.String reflowLine(java.lang.String line)
When wrapping the second line and following, prefix the string with a number of spaces. This will use the first colon (:) to determine the prefix size or use 4 as a minimum if there are no colons in the string.
line
- The line to reflow. Must be non-null.public static java.lang.String reformatLine(java.lang.String format, java.lang.Object... params)
String.format(String, Object...)
and then returns the result of reflowLine(String)
.format
- The string format.params
- The parameters for the string format.reflowLine(String)
on the formatted string.