public final class STA
extends com.mindprod.common11.ST
Modifier | Constructor and Description |
---|---|
protected |
STA()
Dummy constructor
STA contains only static methods.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
condense(java.lang.String s)
Collapse multiple spaces in string down to a single space.
|
static void |
main(java.lang.String[] args)
Test harness, used in debugging
|
static java.lang.String[] |
pruneExcessBlankLines(java.lang.String[] lines,
int minBlankLinesToKeep)
Collapse multiple blank lines down to one.
|
static java.lang.String |
quoteSQL(java.lang.String sql)
used to prepare SQL string literals by doubling each embedded ' and wrapping in ' at each end.
|
static java.lang.String |
spaceOut(java.lang.String s)
insert spaces between the letters
|
static java.lang.String |
squish(java.lang.String s)
Remove all spaces from a String.
|
beep, canonical, chopLeadingString, chopTrailingString, countInstances, countInstances, countLeading, countLeading, countTrailing, countTrailing, firstWord, haveCommonChar, indexOfWhiteSpace, indexOfWhiteSpace, isDigit, isEmpty, isLegal, isLegal, isLetter, isUnaccentedLowerCase, isUnaccentedUpperCase, isVowel, lastWord, leftJustified, leftPad, parseDirtyLong, parseLongPennies, penniesToString, pluck, rep, rightJustified, rightPad, spaces, toBookTitleCase, toHexString, toLowerCase, toLowerCase, toLZ, toLZ, toLZHexString, toString, toUpperCase, toUpperCase, trimLeading, trimLeading, trimLeading, trimTrailing, trimTrailing, trimTrailing
public static java.lang.String condense(java.lang.String s)
s
- String to strip of blanks.squish(String)
public static java.lang.String[] pruneExcessBlankLines(java.lang.String[] lines, int minBlankLinesToKeep)
lines
- array of lines to tidy.minBlankLinesToKeep
- usually 1 meaning 1+ consecutive blank lines become 1, effectively collapsing
runs of blank lines down to 1.
if 2, 1 blank line is removed, and 2+ consecutive blanks lines become 1,
effectively undouble spacing.
if zero, non-blank lines will be separated by one blank line, even if there was not
one there to begin with, completely independent of preexisting blank lines,
effectively double spacing..
9999 effectively removes all blank lines.public static java.lang.String quoteSQL(java.lang.String sql)
sql
- Raw SQL string literalpublic static java.lang.String spaceOut(java.lang.String s)
s
- string of letterspublic static java.lang.String squish(java.lang.String s)
s
- String to strip of blanks.condense(String)
public static void main(java.lang.String[] args)
args
- not used