|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjme3tools.navigation.StringUtil
public class StringUtil
A collection of String utilities.
Constructor Summary | |
---|---|
StringUtil()
|
Method Summary | |
---|---|
java.lang.String |
boolArrToStr(boolean[] arr)
|
java.lang.String |
padNum(double num,
int wholeLen,
int decimalPlaces)
Right aligns a double number with spaces for printing |
java.lang.String |
padNum(float num,
int wholeLen,
int decimalPlaces)
Right aligns a float number with spaces for printing |
java.lang.String |
padNum(int num,
int totalLen)
Right aligns an integer number with spaces for printing |
java.lang.String |
padNum(long num,
int totalLen)
Right aligns a long number with spaces for printing |
java.lang.String |
padNumZero(double num,
int wholeLen,
int decimalPlaces)
Right aligns a double number with zeros for printing |
java.lang.String |
padNumZero(float num,
int wholeLen,
int decimalPlaces)
Right aligns a float number with zeros for printing |
java.lang.String |
padNumZero(int num,
int totalLen)
Right aligns an integer number with zeros for printing |
java.lang.String |
padNumZero(long num,
int totalLen)
Right aligns a long number with zeros for printing |
java.lang.String |
padStringRight(java.lang.String input,
int wholeLen)
Right aligns a String with zeros for printing |
java.lang.String |
prettyNum(double num)
Formats a double nicely for printing: THIS DOES NOT ROUND!!!! |
java.lang.String[] |
splitDelimitedStr(java.lang.String str,
java.lang.String delimiter)
Splits a newline (\n) delimited string into an array of strings |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StringUtil()
Method Detail |
---|
public java.lang.String[] splitDelimitedStr(java.lang.String str, java.lang.String delimiter)
str
- the string to split updelimiter
- the delimiter to use in splitting
public java.lang.String padNum(long num, int totalLen)
num
- the number to be alignedtotalLen
- the total length of the padded string
public java.lang.String padNumZero(long num, int totalLen)
num
- the number to be alignedtotalLen
- the total length of the padded string
public java.lang.String padNum(int num, int totalLen)
num
- the number to be alignedtotalLen
- the total length of the padded string
public java.lang.String padNumZero(int num, int totalLen)
num
- the number to be alignedtotalLen
- the total length of the padded string
public java.lang.String padNum(double num, int wholeLen, int decimalPlaces)
num
- the number to be alignedwholeLen
- the total length of the padded string
public java.lang.String padNumZero(double num, int wholeLen, int decimalPlaces)
num
- the number to be alignedwholeLen
- the total length of the padded string
public java.lang.String padNum(float num, int wholeLen, int decimalPlaces)
num
- the number to be alignedwholeLen
- the total length of the padded string
public java.lang.String padNumZero(float num, int wholeLen, int decimalPlaces)
num
- the number to be alignedwholeLen
- the total length of the padded string
public java.lang.String padStringRight(java.lang.String input, int wholeLen)
String
with zeros for printing
input
- the String to be alignedwholeLen
- the total length of the padded string
public java.lang.String boolArrToStr(boolean[] arr)
arr
- a boolean array to be represented as a string
public java.lang.String prettyNum(double num)
num
- the double to be turned into a pretty string
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |