Package com.android.sdklib.util
Class LineUtil
- java.lang.Object
-
- com.android.sdklib.util.LineUtil
-
public abstract class LineUtil extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description LineUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringreflowLine(java.lang.String line)Reformats a line so that it fits in 78 characters max.static java.lang.StringreformatLine(java.lang.String format, java.lang.Object... params)Formats the string usingString.format(String, Object...)and then returns the result ofreflowLine(String).
-
-
-
Method Detail
-
reflowLine
public static java.lang.String reflowLine(java.lang.String line)
Reformats a line so that it fits in 78 characters max.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.
- Parameters:
line- The line to reflow. Must be non-null.- Returns:
- A new line to print as-is, that contains \n as needed.
-
reformatLine
public static java.lang.String reformatLine(java.lang.String format, java.lang.Object... params)Formats the string usingString.format(String, Object...)and then returns the result ofreflowLine(String).- Parameters:
format- The string format.params- The parameters for the string format.- Returns:
- The result of
reflowLine(String)on the formatted string.
-
-