|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.cometway.util.StringTools
public class StringTools
A set of utilities for manipulating strings.
| Constructor Summary | |
|---|---|
StringTools()
|
|
| Method Summary | |
|---|---|
static java.lang.String[] |
commaToArray(java.lang.String in)
This method parses a comma separated String of elements and returns them in an array |
static java.lang.String |
decodeBinHex(java.lang.String binhex)
This method decodes BinHex 4.0 data. |
static java.lang.String |
decodeBinHex(java.lang.String binhex,
boolean decodeMac,
boolean verbose)
This method decodes BinHex 4.0 data. |
static java.awt.Dimension |
getDimension(java.lang.String in)
returns a the number of rows (lines/Height) and columns (Width) of a string as a java.awt.Dimension |
static int |
getIntParam(java.lang.String[] args,
java.lang.String sw)
returns an int value of a parameter 'sw' given all the parameters 'args' |
static java.lang.String |
getParam(java.lang.String[] args,
java.lang.String sw)
returns a String value of the parameger 'sw' given all the parameter 'args' |
static boolean |
hasParam(java.lang.String[] args,
java.lang.String sw)
returns true if 'sw' is a param within 'args', the list of parameters |
static java.util.Vector |
pairCaseSensitiveSort(java.util.Vector in)
Sorts Pairs within a vector based on the first object (which should be string) |
static java.util.Vector |
pairSort(java.util.Vector in)
Case-insensitive Sort of Pairs within a vector based on the first object (which should be string) |
static java.lang.String[] |
parseArgs(java.lang.String in)
Takes a string and parses them into arguments, preserving backslashes and double quotes. |
static java.lang.String |
removeHTMLTags(java.lang.String in)
returns a string without anything matching <*> (all HTML tags) |
static java.lang.String |
truncateString(java.awt.Graphics g,
java.lang.String inString,
int length)
Returns a string that is guaranteed to fit within 'length' using a FontMetrics of a graphics. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StringTools()
| Method Detail |
|---|
public static java.lang.String decodeBinHex(java.lang.String binhex)
binhex - The BinHex 4.0 data to be decoded and converted.
public static java.lang.String decodeBinHex(java.lang.String binhex,
boolean decodeMac,
boolean verbose)
binhex - The BinHex 4.0 data to be decoded and/or converted.decodeMac - If this is TRUE, decoded data will be converted from Mac format.verbose - If this is TRUE, errors will be reported to System.err.
public static java.lang.String[] commaToArray(java.lang.String in)
public static java.awt.Dimension getDimension(java.lang.String in)
There are some specifics: (h x w) '' will return 0 x 0 '\n\n' will return 0 x 2 '\na\na\n' will return 1 x 3 '\ra\ra' will return 1 x 2 '\n\rabc\n\rab' will return 3 x 3 '\r\nabcd\r\n' will return 4 x 2
in - The string to find the max dimension of
Dimension
public static int getIntParam(java.lang.String[] args,
java.lang.String sw)
public static java.lang.String getParam(java.lang.String[] args,
java.lang.String sw)
public static boolean hasParam(java.lang.String[] args,
java.lang.String sw)
public static java.lang.String removeHTMLTags(java.lang.String in)
public static java.util.Vector pairCaseSensitiveSort(java.util.Vector in)
public static java.lang.String truncateString(java.awt.Graphics g,
java.lang.String inString,
int length)
public static java.util.Vector pairSort(java.util.Vector in)
public static java.lang.String[] parseArgs(java.lang.String in)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||