com.mindbright.util
public final class StringUtil extends java.lang.Object
| Constructor and Description |
|---|
StringUtil() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
nBytesToString(long nBytes,
int digits)
Converts a byte count to a readable string with an unit .
|
static java.lang.String |
trimLeft(java.lang.String str)
Trims space from the start of a string.
|
static java.lang.String |
trimRight(java.lang.String str)
Trims space from the end of a string.
|
public static java.lang.String trimLeft(java.lang.String str)
str - string to trim space characters frompublic static java.lang.String trimRight(java.lang.String str)
str - string to trim space characters frompublic static java.lang.String nBytesToString(long nBytes,
int digits)
nBytes - the byte count to printdigits - how many digits the printout may contain. Note
that this count does not include the unit length