|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbsharp.strings.Strings
public class Strings
Helper methods for string modifcations.
| Field Summary | |
|---|---|
static java.lang.String |
NL
NEW LINE. |
static java.lang.String |
QUOTE
A QUOTE. |
static java.lang.String |
SPACE
A SPACE. |
| Method Summary | |
|---|---|
static java.lang.String |
indent(java.lang.String s,
char fill,
int targetSize)
Prepend the given character until the string is the width of targetSize. |
static java.lang.String |
quote(java.lang.String s)
Enclose the given string in quotes. |
static java.lang.String |
replaceAll(java.lang.String input,
java.lang.String match,
java.lang.String replaceWith)
Replace all occurrences of the character with the replacement string. |
static java.lang.String |
subtractLeft(java.lang.String source,
java.lang.String subtract)
Subtract the second string from the left side of the first. |
static java.lang.String |
subtractRight(java.lang.String source,
java.lang.String subtract)
Subtract the second string from the right side of the first. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String NL
public static final java.lang.String SPACE
public static final java.lang.String QUOTE
| Method Detail |
|---|
public static java.lang.String subtractRight(java.lang.String source,
java.lang.String subtract)
source - the first string.subtract - subtract this from the first string.
public static java.lang.String subtractLeft(java.lang.String source,
java.lang.String subtract)
source - the first string.subtract - subtract this from the first string.
public static java.lang.String indent(java.lang.String s,
char fill,
int targetSize)
s - the string to indent.fill - the character to prepend.targetSize - the size to make the final string.
public static java.lang.String quote(java.lang.String s)
s - the input string.
public static java.lang.String replaceAll(java.lang.String input,
java.lang.String match,
java.lang.String replaceWith)
input - the input string.match - replaceWith -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||