|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.safs.StringUtilities.StringUtilities
Constructor Summary | |
StringUtilities()
|
Method Summary | |
static boolean |
charIsInRange(char c,
int beg,
int end)
Method charIsInRange. |
static int |
getNumSubstrings(java.lang.String strSub,
java.lang.String strText)
Method getNumSubstrings. |
static java.util.Vector |
getSubStrings(java.lang.String strText)
Method getSubStrings. |
static java.util.Vector |
getSubStrings(java.lang.String strText,
java.util.Vector vQuoteLocs)
Method getSubStrings. |
static boolean |
isLegalVarName(java.lang.String strVarName)
Method isLegalVarName. |
static boolean |
isQuoted(java.lang.String strText,
int location)
Method isQuoted. |
static boolean |
isQuoted(java.lang.String strText,
int location,
java.util.Vector vQuoteLocs)
Method isQuoted. |
static boolean |
isValidNonStdChar(char c)
Method isValidNonStdChar. |
static int |
locateNextUnquotedSingleChar(java.lang.String strSearch,
java.lang.String strChars,
int ipos)
Method locateNextUnquotedSingleChar. |
static int |
locateNextUnquotedSingleChar(java.lang.String strSearch,
java.lang.String strChars,
int ipos,
java.util.Vector vQuoteLocs)
Method locateNextUnquotedSingleChar. |
static int |
locateNextUnquotedSubstring(java.lang.String strSearch,
java.lang.String strFind,
int ipos)
Method locateNextUnquotedSubstring. |
static int |
locateNextUnquotedSubstring(java.lang.String strSearch,
java.lang.String strFind,
int ipos,
java.util.Vector vQuoteLocs)
Method locateNextUnquotedSubstring. |
static java.util.Vector |
locateQuotedSubStrings(java.lang.String strText)
Method locateQuotedSubStrings. |
static java.lang.String |
LTWhitespace(java.lang.String strValue)
Method LTWhitespace. |
static boolean |
nextCharIsDQ(java.lang.String strText,
int location)
Method nextCharIsDQ. |
static java.lang.String |
removeAllNonQuotedWhitespace(java.lang.String strValue)
Method removeAllNonQuotedWhitespace. |
static java.lang.String |
removeAllNonQuotedWhitespace(java.lang.String strValue,
java.util.Vector vQuoteLocs)
Method removeAllNonQuotedWhitespace. |
static java.lang.String |
replaceString(java.lang.String strSearch,
java.lang.String strReplace,
int ibegin,
int iend)
Method replaceString. |
static java.lang.String |
reverse(java.lang.String s)
Method reverse. |
static java.lang.String |
RTWhitespace(java.lang.String strValue)
Method RTWhitespace. |
static java.lang.String |
TWhitespace(java.lang.String strValue)
Method TWhitespace. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StringUtilities()
Method Detail |
public static java.lang.String LTWhitespace(java.lang.String strValue)
strValue
- String to remove leading whitespace (space and tab)public static java.lang.String RTWhitespace(java.lang.String strValue)
strValue
- String to remove trailing whitespace (space and tab)public static java.lang.String TWhitespace(java.lang.String strValue)
strValue
- String to remove whitespace (space and tab)public static boolean charIsInRange(char c, int beg, int end)
c
- character to checkbeg
- lower end of rangeend
- higher end of rangepublic static int getNumSubstrings(java.lang.String strSub, java.lang.String strText)
strSub
- substring to count occurancesstrText
- string to search for strSub occurancespublic static boolean nextCharIsDQ(java.lang.String strText, int location)
strText
- String to checklocation
- int location to start checkpublic static java.util.Vector locateQuotedSubStrings(java.lang.String strText)
Vector
that contains
Integer
objects whose intValue specifies the location of a double
quote (") in strText. Note that double quotes must be paired so there
should be an even number of Integer objects withing the returned Vector.strText
- String in which to locate the quoted substringspublic static boolean isQuoted(java.lang.String strText, int location)
strText
- String to checklocation
- Location to checkpublic static boolean isQuoted(java.lang.String strText, int location, java.util.Vector vQuoteLocs)
strText
- String to checklocation
- Location to checkvQuoteLocs
- Vector
containing Integer
objects whose intValue
specifies the location of a double quote (") in strText.public static java.util.Vector getSubStrings(java.lang.String strText)
Vector
containing String
objects
that are quoted substrings within strTextstrText
- The string to find substringspublic static java.util.Vector getSubStrings(java.lang.String strText, java.util.Vector vQuoteLocs)
Vector
containing String
objects
that are quoted substrings within strTextstrText
- The string to find substringsvQuoteLocs
- Vector
containing Integer
objects whose intValue
specifies the location of a double quote (") in strText.public static int locateNextUnquotedSingleChar(java.lang.String strSearch, java.lang.String strChars, int ipos)
strSearch
- The string to searchstrChars
- A string consisting of single characters to find the first occurance ofipos
- int position within strSearch to begin searchpublic static int locateNextUnquotedSingleChar(java.lang.String strSearch, java.lang.String strChars, int ipos, java.util.Vector vQuoteLocs)
strSearch
- The string to searchstrChars
- A string consisting of single characters to find the first occurance ofipos
- int position within strSearch to begin searchvQuoteLocs
- Vector
containing Integer
objects whose intValue
specifies the location of a double quote (") in strText.public static int locateNextUnquotedSubstring(java.lang.String strSearch, java.lang.String strFind, int ipos)
strSearch
- The string to searchstrFind
- The substring to search foripos
- int position within strSearch to begin searchpublic static int locateNextUnquotedSubstring(java.lang.String strSearch, java.lang.String strFind, int ipos, java.util.Vector vQuoteLocs)
strSearch
- The string to searchstrFind
- The substring to search foripos
- int position within strSearch to begin searchvQuoteLocs
- Vector
containing Integer
objects whose intValue
specifies the location of a double quote (") in strText.public static java.lang.String removeAllNonQuotedWhitespace(java.lang.String strValue)
String
that is strValue with
all non quoted whitespace (space and tab) removed. (keeps whitespace between double quotes)strValue
- The string to remove non-quoted whitespacepublic static java.lang.String removeAllNonQuotedWhitespace(java.lang.String strValue, java.util.Vector vQuoteLocs)
String
that is strValue with
all non quoted whitespace (space and tab) removed. (keeps whitespace between double quotes)strValue
- The string to remove non-quoted whitespacevQuoteLocs
- Vector
containing Integer
objects whose intValue
specifies the location of a double quote (") in strText.public static java.lang.String replaceString(java.lang.String strSearch, java.lang.String strReplace, int ibegin, int iend)
strSearch
- The string to searchstrReplace
- The replacement stringibegin
- int location to begin replacementiend
- int location to end replacementpublic static java.lang.String reverse(java.lang.String s)
s
- The string to reversepublic static boolean isLegalVarName(java.lang.String strVarName)
strVarName
- The variable name to testpublic static boolean isValidNonStdChar(char c)
c
- The char to test
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |