|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object maslab.util.StringUtil
public class StringUtil
Various useful functions for strings.
Constructor Summary | |
---|---|
StringUtil()
|
Method Summary | |
---|---|
static java.lang.String |
formatDouble(double d,
int decimalPlaces)
|
static java.lang.String |
formatHex(long l,
int digits)
|
static void |
main(java.lang.String[] args)
|
static java.lang.String |
padLeft(java.lang.String in,
int length,
char c)
Pad a string with characters on the left. |
static java.lang.String |
padRight(java.lang.String in,
int length,
char c)
Pad a string with characters on the right. |
static double |
parseDouble(java.lang.String in)
Parse a number of the format XXXXX(.YYYY)? |
static java.lang.String[] |
split(java.lang.String in,
java.lang.String delim)
Encapsulates the functionality of StringTokenizer in semantics that look more like String.split(), a function that is only available in Java 1.4. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StringUtil()
Method Detail |
---|
public static java.lang.String padLeft(java.lang.String in, int length, char c)
in
- The string to padlength
- The desired final length of the string.
public static java.lang.String padRight(java.lang.String in, int length, char c)
in
- The string to padlength
- The desired final length of the string.
public static java.lang.String[] split(java.lang.String in, java.lang.String delim)
in
- The string you want to split.delim
- The set of characters to use as delimiters.
public static java.lang.String formatDouble(double d, int decimalPlaces)
public static double parseDouble(java.lang.String in)
public static java.lang.String formatHex(long l, int digits)
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |