|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--edu.mit.ai.psg.strings.Indent
Indent strings.
| Method Summary | |
static String |
leadingWhitespace(String string)
|
static String |
makeSpaces(int length)
make a short string length spaces long. |
static String |
string(int spaces,
String stringToIndent)
adds spaces after every non-final newline (not at beginning) |
static String |
string(String indent,
String stringToIndent)
adds indent after every non-final newline (not at beginning) |
static String |
string(String indent,
String stringToIndent,
boolean addToStart)
adds indent after every non-final newline; if addToStart is true, adds indent at beginning as well. |
static String |
trimNewlines(String untrimmedString)
like String.trim(), but preserves indentation |
static String |
unindent(int spaces,
String stringToUnindent)
delete spaces where they appears in string at beginning and after newlines |
static String |
unindent(String indent,
String stringToUnindent)
delete indent where it appears in string at beginning and after newlines |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Method Detail |
public static String string(int spaces,
String stringToIndent)
public static String string(String indent,
String stringToIndent)
public static String string(String indent,
String stringToIndent,
boolean addToStart)
public static String makeSpaces(int length)
public static String trimNewlines(String untrimmedString)
public static final String unindent(int spaces,
String stringToUnindent)
public static final String unindent(String indent,
String stringToUnindent)
public static final String leadingWhitespace(String string)
|
Copyright (c) 1996-1999 Massachusetts Institute of Technology Feedback: jeva-feedback@ai.mit.edu |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||