|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.dbforms.util.StringUtil
public class StringUtil
This utility-class provides convenience methods for parsing strings and generating certain data structures
Constructor Summary | |
---|---|
StringUtil()
|
Method Summary | |
---|---|
static String |
getEmbeddedString(String str,
int afterDelims,
char delim)
Method for parsing substring embedded by constant delimeters. |
static int |
getEmbeddedStringAsInteger(String str,
int afterDelims,
char delim)
Get the int value of the substring contained between the afterDelims delimiter occurence and the next one |
static String |
getEmbeddedStringWithoutDots(String str,
int afterDelims,
char delim)
Method for parsing substring embedded by constant delimeters Because getEmbeddedString() support "." for image button, this method do the the same, but ignore dots. |
static Vector |
splitString(String str,
String delimeter)
Get a Vector object containing all the tokens related to the input string, splitted using the input delimiter. |
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 static String getEmbeddedString(String str, int afterDelims, char delim)
getEmbeddedString(s, 0, '_') ==> "ac" getEmbeddedString(s, 1, '_') ==> "update" getEmbeddedString(s, 2, '_') ==> "3" getEmbeddedString(s, 3, '_') ==> "12" getEmbeddedString(s, 3, '_') ==> will throw a Runtime Exception
str
- the string to parseafterDelims
- the delimiter occurence where to start to parsedelim
- the delimiter string
afterDelims
delimiter occurence
and the next onepublic static int getEmbeddedStringAsInteger(String str, int afterDelims, char delim)
afterDelims
delimiter occurence and the next one
str
- the string to parseafterDelims
- the delimiter occurence where to start to parsedelim
- the delimiter string
afterDelims
delimiter occurence and the next onepublic static String getEmbeddedStringWithoutDots(String str, int afterDelims, char delim)
getEmbeddedString(s, 0, '_') ==> "" getEmbeddedString(s, 1, '_') ==> "" getEmbeddedString(s, 2, '_') ==> "" getEmbeddedString(s, 3, '_') ==> "" getEmbeddedString(s, 3, '_') ==> will throw a Runtime Exception
str
- the string to parseafterDelims
- the delimiter occurence where to start to parsedelim
- the delimiter string
afterDelims
delimiter occurence
and the next onepublic static Vector splitString(String str, String delimeter)
str
- the string to splitdelimeter
- the delimiter string
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |