public class Format
extends java.lang.Object
Constructor and Description |
---|
Format() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
alignLeftAndPad(java.lang.String text,
int size)
Puts the text to the left and pads with spaces until the size is reached.
|
static java.lang.String |
alignRightAndPad(java.lang.String text,
int size)
Puts the text to the right and pads it with spaces until the size is reached.
|
static java.lang.String |
convertTabsToSpaces(java.lang.String line,
int tabWidth)
Converts all tabs on a line to spaces according to the provided tab width.
|
static java.lang.String |
escapeJava(java.lang.String string)
Escapes a string using java rules.
|
static java.lang.String |
formatParagraph(java.lang.String src,
int len,
boolean breakOnWhitespace)
Formats provided string as paragraph.
|
static java.lang.String |
fromCamelCase(java.lang.String input,
char separator)
Changes CamelCase string to lower case words separated by provided
separator character.
|
static java.lang.String |
humanReadableByteCount(long bytes,
boolean useSi)
Formats byte size to human readable bytecount.
|
static java.lang.String |
toCamelCase(java.lang.String input,
boolean firstCharUppercase,
char separator)
Converts separated string value to CamelCase.
|
static java.lang.String |
toPrettyString(java.lang.Object value)
Converts object into pretty string.
|
static java.lang.String |
unescapeJava(java.lang.String str)
Unescapes a string using java rules.
|
public static java.lang.String alignLeftAndPad(java.lang.String text, int size)
public static java.lang.String alignRightAndPad(java.lang.String text, int size)
public static java.lang.String humanReadableByteCount(long bytes, boolean useSi)
public static java.lang.String toPrettyString(java.lang.Object value)
public static java.lang.String fromCamelCase(java.lang.String input, char separator)
theFOO
to the_foo
).
Foo
to foo
and not _foo
)
user_Name
to user_name
and not user__name
.
public static java.lang.String toCamelCase(java.lang.String input, boolean firstCharUppercase, char separator)
public static java.lang.String formatParagraph(java.lang.String src, int len, boolean breakOnWhitespace)
public static java.lang.String convertTabsToSpaces(java.lang.String line, int tabWidth)
public static java.lang.String escapeJava(java.lang.String string)
public static java.lang.String unescapeJava(java.lang.String str)
Copyright © 2003-present Jodd Team