|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.erights.e.develop.format.StringHelper
Untamed: Like the old StringSugar, except it's only a convenience for ELib programmers, not for E language programmers. E language programmers never see Java Strings directly, they only see Twine. Twine has some similar methods built on these.
Constructor Summary | |
private |
StringHelper()
prevent instantiation |
Method Summary | |
static String |
aan(String self)
Enabled: Return self prefixed by "a " or "an " according to a simple (and therefore inadequate) heuristic, but good enough for cheezy uses. |
static String |
canonical(String self)
Enabled: Each crlf is turned into an lf to deal with MSWindows, and then each remaining cr is turned into an lf to deal with Mac. |
static String |
multiply(String self,
int reps)
Enabled: reps repitions of self |
static String |
quote(String self)
Enabled: Returns a string that, when interpreted as a literal, represents the original string. |
static String |
replaceAll(String self,
String oldStr,
String newStr)
Enabled: The string-based replaceAll() supplements the character-based replace(). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
private StringHelper()
Method Detail |
public static String multiply(String self, int reps)
public static String replaceAll(String self, String oldStr, String newStr)
String.replace(char, char)
public static String canonical(String self)
public static String quote(String self)
public static String aan(String self)
Note that this routine is not expected to internationalize well.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |