|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.perdues.PString
Static utility methods involving Strings.
Method Summary | |
static java.lang.String |
after(java.lang.String subject,
java.lang.String delimiter)
Returns a suffix of the subject, starting just after the first occurrence of the delimiter string. |
static java.lang.String |
afterLast(java.lang.String subject,
java.lang.String delimiter)
Returns a suffix of the subject, starting just after the last occurrence of the delimiter string. |
static int |
intValue(java.lang.String s,
int dfault)
Returns the decimal integer value represented by the String, or the given default if the string is null or its format is bad. |
static void |
main(java.lang.String[] args)
For testing. |
static java.lang.String |
padLeft(java.lang.String s,
int width,
char c)
Pad a string on the left to the specified width in characters, using the specified pad character and returning the string with added padding. |
static java.lang.String |
padRight(java.lang.String s,
int width,
char c)
Pad a string on the right to the specified width in characters, using the specified pad character and returning the string with added padding. |
static java.lang.String |
readAll(java.io.InputStream ins)
Read all remaining input from the InputStream through the default character encoding, and return it as a String. |
static java.lang.String |
readAll(java.io.Reader reader)
Reads all remaining input from the Reader and returns it as a String. |
static java.lang.String |
readAll(java.net.URL url)
Reads and returns the contents of a URL as a String. |
static java.lang.String |
subst(java.lang.String subject,
java.lang.String old,
java.lang.String nu)
Substitute a new value in place of all occurrences one substring within a subject string. |
static java.lang.String |
toString(java.lang.Object o)
Same as object.toString() except for arrays, which come out as "{a[1],a[2],...}". |
static java.lang.String |
upTo(java.lang.String subject,
java.lang.String delimiter)
Returns a prefix of subject, up to the first occurrence of the delimiter string, or the entire subject if the delimiter is not found. |
static java.lang.String |
upToLast(java.lang.String subject,
java.lang.String delimiter)
Returns a prefix of subject, up to the last occurrence of the delimiter string, or the entire subject if the delimiter is not found. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static java.lang.String toString(java.lang.Object o)
public static int intValue(java.lang.String s, int dfault)
public static java.lang.String upTo(java.lang.String subject, java.lang.String delimiter)
public static java.lang.String upToLast(java.lang.String subject, java.lang.String delimiter)
public static java.lang.String after(java.lang.String subject, java.lang.String delimiter)
public static java.lang.String afterLast(java.lang.String subject, java.lang.String delimiter)
public static java.lang.String padRight(java.lang.String s, int width, char c)
public static java.lang.String padLeft(java.lang.String s, int width, char c)
public static java.lang.String subst(java.lang.String subject, java.lang.String old, java.lang.String nu)
public static java.lang.String readAll(java.io.InputStream ins) throws java.io.IOException
public static java.lang.String readAll(java.io.Reader reader) throws java.io.IOException
public static java.lang.String readAll(java.net.URL url) throws java.io.IOException
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |