|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.af.commons.tools.StringTools
public class StringTools
This class provides various static methods for handling String objects.
| Constructor Summary | |
|---|---|
StringTools()
|
|
| Method Summary | |
|---|---|
static String |
arrayToString(Object[] strings)
Converts an Object array Object[] obj to the String: "["+obj[0].toString()+", "+obj[1].toString()+","+ ... +", "+obj[obj.length].toString()+"]" |
static int |
count(String s,
String substring)
Counts the occurrences of substring in String s. |
static String |
getSubstringAfter(String s,
String split,
int i)
Returns the substring from the i-th occurrence of split. |
static String |
getSubstringBefore(String s,
String split,
int i)
Returns the substring up to the i-th occurrence of split. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StringTools()
| Method Detail |
|---|
public static String getSubstringBefore(String s,
String split,
int i)
split - Regular expression string to use for splitting.
public static String getSubstringAfter(String s,
String split,
int i)
split - Regular expression string to use for splitting.
public static int count(String s,
String substring)
s - substring -
public static String arrayToString(Object[] strings)
strings -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||