|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--xbn.XBNObject | +--xbn.string.UtilSOB | +--xbn.string.UtilString
Random functions for java.lang.Strings. See String.
Source code: UtilString.java. Unit tests: xbn_junit.string.JUTUtilString.java and also see the unit tests for UtilSOB..
Field Summary | |
static String |
sUS
To shorten code and Javadoc. |
Fields inherited from class xbn.string.UtilSOB |
sUSOB |
Fields inherited from class xbn.XBNObject |
bFALSE_IN_PRODUCTION, bTRUE_IN_PRODUCTION, sCNSTR, sES, sLINE_SEP |
Constructor Summary | |
UtilString()
Create a UtilString. |
Method Summary | |
String[] |
getAOHexDigitAsStr(String s_tr)
|
SOBString[] |
getAOSOBS(String[] a_string)
Get an array of SOBStrings from the array of strings. |
SOBStringBuffer[] |
getAOSOBSB(String[] a_string)
Get an array of SOBStringBuffers from the array of strings. |
boolean |
getBoolean(String s_potentialBoolean)
Get a boolean from the value in the string. |
String |
getConditional(String s_value)
Conditionally get the string, if it's not null. |
String |
getConditional(String s_value,
String s_whenObjectNull)
Conditionally get the string, if it's not null. |
String |
getConditional(String s_prefix,
String s_value,
String s_postfix)
Convenience function to conditionally display a variable when non-null. |
String |
getConditional(String s_prefix,
String s_value,
String s_postfix,
String s_whenValueNull)
Convenience function to conditionally display a variable when non-null. |
String |
getConditional(String s_prefix,
String s_value,
String s_postfix,
String s_whenValueNull,
String s_whenValueEmpty)
Get the string value (plus prefix and postfix) only when not-null. |
i_i_i |
getContainedIdxs(String[] a_string)
If any string is contained in (or equal to) any other, get information describing the containment. |
i_i_i |
getContainedIdxs(String[] a_string,
GCIConfig gci_config)
If any string is contained in any other, get information describing the containment. |
i_i_i |
getContainedIdxs(String s_x,
String s_y)
If either string is contained in or equal to the other, get information describing the containment. |
i_i_i |
getContainedIdxs(String s_x,
String s_y,
GCICTwo gcic_two)
If either string is contained in (or equal to) the other, get information describing the containment. |
Date |
getDate(String s_potentialDate,
SimpleDateFormat simple_dateFormat)
Get a Date object from the potential date string and SimpleDateFormat. |
Date |
getDate(String s_potentialDate,
String s_dateFormat)
Get a Date object from the potential date string and date format. |
String |
getDupAppend(String s_tr,
String s_toDuplicate,
int i_dupCount)
Get a copy of the String, after appending a duplicated string onto it. |
String |
getDuped(String s_tr,
int i_dupCount)
Get the priovided string, duplicated. |
int |
getIdxNEToLmnt0(String[] a_string)
What is the first array index containing an int not equal to element zero? |
int |
getIdxOf1stCharNIA(String s_tr,
char[] a_char)
Get the array index of the first character that is not a member of the array. |
int |
getIdxOf1stCharNIA(String s_tr,
char[] a_char,
boolean b_validateAOC)
Get the array index of the first character that is not a member of the array. |
int |
getIdxOf1stCharNIA(String s_tr,
char[] a_char,
int i_idxStart,
int i_idxAfterEnd)
Get the array index of the first character that is not a member of the array. |
int |
getIdxOf1stCharNIA(String s_tr,
char[] a_char,
int i_idxStart,
int i_idxAfterEnd,
boolean b_validateAOC)
Get the array index of the first character that does not exist in the array. |
int |
getIdxOf1stNonWS(String s_tr)
Get the array index of the first non-white-space character. |
int |
getIdxOfLastCharNIA(String s_tr,
char[] a_char)
Get the array index of the last character that is not a member of the array. |
int |
getIdxOfLastCharNIA(String s_tr,
char[] a_char,
boolean b_validateAOC)
Get the array index of the last character that is not a member of the array. |
int |
getIdxOfLastCharNIA(String s_tr,
char[] a_char,
int i_idxStart,
int i_idxAfterEnd)
Get the array index of the last character that is not a member of the array. |
int |
getIdxOfLastCharNIA(String s_tr,
char[] a_char,
int i_idxStart,
int i_idxAfterEnd,
boolean b_validateAOC)
Get the array index of the last character that does not exist in the array. |
int |
getIdxOfLastNonWS(String s_tr)
Get the array index of the last non-white-space character. |
int |
getInt(String s_potentialInt)
Get an int from the value in the string. |
int |
getInt(String s_potentialInt,
boolean b_nfxInsteadOfax)
Get an int from the value in the string. |
long |
getLong(String s_potentialLong)
Get an long from the value in the string. |
long |
getLong(String s_potentialLong,
boolean b_nfxInsteadOfax)
Get an long from the value in the string. |
String |
getQuotedLines(String s_tr)
Get a copy of the String where each line is quoted. |
String |
getQuotedLines(String s_tr,
String s_quote)
Get a copy of the String where each line is quoted. |
String |
getQuotedLines(String s_tr,
String s_quoteStart,
String s_quoteEnd)
Get a copy of the String where each line is quoted. |
String |
getQuotedLines(String s_tr,
String s_quoteStart,
String s_quoteEnd,
String s_lineSep)
Get a copy of the String where each line is quoted. |
String |
getRandomHex(int i_digits)
Get a random hex number with the requested number of digits. |
String |
getReplaceAll(String s_tr,
String s_replaceWhat,
String s_replaceWith)
Return a copy of the provided string, in which all occurances are replaced. |
String |
getReplaceUntil(String s_tr,
String s_replaceWhat,
String s_replaceWith)
Replace all occurances, with multiple passes, until no instances of the search string remain. |
StringBuffer |
getSB(String s_tr)
Create an SOBStringBuffer with the String. |
SOBString |
getSOBS(String s_tr,
String s_callingClsFnc)
Create an SOBString from the String. |
SOBString |
getSOBS(String s_tr,
String s_sDescription,
String s_callingClsFnc)
Create an SOBString from the String. |
SOBStringBuffer |
getSOBSB(String s_tr,
String s_callingClsFnc)
Create an SOBStringBuffer from the String. |
SOBStringBuffer |
getSOBSB(String s_tr,
String s_sDescription,
String s_callingClsFnc)
Create an SOBStringBuffer from the String. |
String |
getVisible(String s_tr)
Get a copy of the String, where the contents' invisible characters are made visible. |
boolean |
hasDigitsOrInAOC(String s_tr,
boolean b_lettersOkOpt,
char[] ac_legal)
Does the string contain only digits and (other provided) legal characters? |
boolean |
hasDigitsOrInAOC(String s_tr,
boolean b_lettersOkOpt,
char[] ac_legal,
boolean b_validateAOC)
Does the string contain only digits and (other provided) legal characters? |
boolean |
hasLDOrInAOC(String s_tr,
char[] ac_legal)
Does the string contain only letters, digits and (other provided) legal characters? |
boolean |
hasLDOrInAOC(String s_tr,
char[] ac_legal,
boolean b_validateAOC)
Does the string contain only letters, digits and (other provided) legal characters? |
boolean |
hasLegalChars(String s_tr,
char[] ac_legal)
Does the string contain only legal characters? |
boolean |
hasLegalChars(String s_tr,
char[] ac_legal,
boolean b_validateAOC)
Does the string contain only legal characters? |
boolean |
hasLettersOrInAOC(String s_tr,
boolean b_digitsOkOpt,
char[] ac_legal)
Does the string contain only letters and (other provided) legal characters? |
boolean |
hasLettersOrInAOC(String s_tr,
boolean b_digitsOkOpt,
char[] ac_legal,
boolean b_validateAOC)
Does the string contain only letters and (other provided) legal characters? |
boolean |
hasNoIllegalChars(String s_tr,
char[] ac_illegal)
Does the string not contain any illegal characters? |
boolean |
hasNoIllegalChars(String s_tr,
char[] ac_illegal,
boolean b_validateAOC)
Does the string not contain any illegal characters? |
boolean |
hasNoTabSpace(String s_tr)
Does the String not contain any whitespace characters? |
boolean |
isBoolean(String s_potentialBoolean)
Does the string contain a valid boolean value?. |
boolean |
isDecimal(String s_potentialDigit)
Is the string a valid decimal number?. |
boolean |
isEmail(String s_potentialEmail)
Is the string a legally formatted email address? |
boolean |
isHexidecimal(String s_potentialHex)
Is the value of the String a valid hexidecimal number? |
boolean |
isInteger(String s_potentialInteger)
Is the string a valid integer?. |
boolean |
isLegal(String s_tr,
boolean b_lettersOkOpt,
boolean b_digitsOkOpt,
char[] ac_legal)
Does the string contain only legal characters? |
boolean |
isLegal(String s_tr,
boolean b_lettersOkOpt,
boolean b_digitsOkOpt,
char[] ac_legal,
boolean b_validateAOC)
Does the string contain only legal characters? |
boolean |
isLetterDigitUnderscore(String s_tr)
Does the string contain only letters, digits and underscores? |
boolean |
isNotDigitsOrInAOC(String s_tr,
boolean b_lettersBadOpt,
char[] ac_legal)
Does the string not contain any digits or (other provided) illegal characters? |
boolean |
isNotDigitsOrInAOC(String s_tr,
boolean b_lettersBadOpt,
char[] ac_legal,
boolean b_validateAOC)
Does the string not contain any digits or (other provided) illegal characters? |
boolean |
isNotIllegal(String s_tr,
boolean b_lettersBadOpt,
boolean b_digitsBadOpt,
char[] ac_illegal)
Does the string not contain any illegal characters? |
boolean |
isNotIllegal(String s_tr,
boolean b_lettersBadOpt,
boolean b_digitsBadOpt,
char[] ac_illegal,
boolean b_validateAOC)
Does the string not contain any illegal characters? |
boolean |
isNotLDOrInAOC(String s_tr,
char[] ac_legal)
Does the string not contain any letters, digits or (other provided) illegal characters? |
boolean |
isNotLDOrInAOC(String s_tr,
char[] ac_legal,
boolean b_validateAOC)
Does the string not contain any letters, digits or (other provided) illegal characters? |
boolean |
isNotLettersOrInAOC(String s_tr,
boolean b_digitsBadOpt,
char[] ac_legal)
Does the string not contain any letters or (other provided) illegal characters? |
boolean |
isNotLettersOrInAOC(String s_tr,
boolean b_digitsBadOpt,
char[] ac_legal,
boolean b_validateAOC)
Does the string not contain any letters or (other provided) illegal characters? |
boolean |
isNumber(String s_potentialDigit,
boolean b_decimalAllowed)
Is the string a valid digit? |
boolean |
isTabSpace(String s_potentialTabSpace)
Does the String contain only whitespace? |
Methods inherited from class xbn.XBNObject |
getXMsgPrefix, sop, sopl, sopl, throwAX, throwAXIfBadStr, throwAXIfNull, throwAXSpoof |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String sUS
To shorten code and Javadoc.
Equal to "xbn.string.UtilString."
Constructor Detail |
public UtilString()
Create a UtilString. This constructor does nothing.
Method Detail |
public final String[] getAOHexDigitAsStr(String s_tr)
public String getRandomHex(int i_digits)
Get a random hex number with the requested number of digits.
i_digits
- The number of digits in length the returned value should be. Must be greater than -1.public String getConditional(String s_value)
Conditionally get the string, if it's not null.
Equal to getConditional(s_value, "")
public String getConditional(String s_value, String s_whenObjectNull)
Conditionally get the string, if it's not null.
Equal to getConditional(null, s_value, null, s_whenObjectNull)
public String getConditional(String s_prefix, String s_value, String s_postfix)
Convenience function to conditionally display a variable when non-null.
Equal to getConditional(s_prefix, s_value, s_postfix, "")
public String getConditional(String s_prefix, String s_value, String s_postfix, String s_whenValueNull)
Convenience function to conditionally display a variable when non-null.
Equal to getConditional(s_prefix, s_value, s_postfix, s_whenValueNull, "")
public String getConditional(String s_prefix, String s_value, String s_postfix, String s_whenValueNull, String s_whenValueEmpty)
Get the string value (plus prefix and postfix) only when not-null. When null, get the alternative ("when-null") value.
s_prefix
- The string to put before the non-null value. When null, no prefix is used (which is the same behavior as when this is equal to empty string).s_value
- The value. When null, all parameters except s_whenValueNull are ignored. When not null, (only) s_whenValueNull is ignored.s_prefix
- The string to put after the non-null value. When null, no postfix is used (which is the same behavior as when this is equal to empty string).s_whenValueNull
- When s_value is null, then this is the entire text that is returned (no prefix or postfix). When s_value is not null, this parameter is ignored. May be null or any number of characters in length. To emphasize, if both an s_value are null, then 'null' is returned.s_whenValueEmpty
- When s_value is zero characters in length, then this is the entire text that is returned (no prefix or postfix). When s_value is not empty, this parameter is ignored. May be null or any number of characters in length. This behaves in the same manner as s_whenValueNull, when s_value is empty.s_prefix + s_value + s_postfix
If s_value is not null. Note that if s_prefix is null, it is omitted. If s_postfix is null, it is omitted.public boolean getBoolean(String s_potentialBoolean)
Get a boolean from the value in the string.
s_potentialBoolean
- The string containing a boolean value.AssertException
- If s_potentialBoolean is null, or contains a value other than "true" or "false".public int getInt(String s_potentialInt)
Get an int from the value in the string.
Equal to getInt(s_potentialInt, false)
public int getInt(String s_potentialInt, boolean b_nfxInsteadOfax)
Get an int from the value in the string.
TODO: A critical difference between this and isNumber: This function uses Integer.valueOf
, and therefore a huge number (like 8374018734087120847104387208472784) is considered invalid according to this function, but valid according to isNumber (would return true).
s_potentialInt
- The string containing an int value.b_nfxInsteadOfax
- If the s_potentialInt is null, or contains an illegal value, according to Integer.valueOf(s_potentialInt).intValue()
public long getLong(String s_potentialLong)
Get an long from the value in the string.
Equal to getLong(s_potentialLong, false)
public long getLong(String s_potentialLong, boolean b_nfxInsteadOfax)
Get an long from the value in the string.
s_potentialLong
- The string containing an long value.b_nfxInsteadOfax
- If the s_potentialLong is null, or contains an illegal value, according to Long.valueOf(s_potentialLong).longValue()
public Date getDate(String s_potentialDate, String s_dateFormat)
Get a Date object from the potential date string and date format.
getDate(s_potentialDate, new SimpleDateFormat(s_dateFormat))
public Date getDate(String s_potentialDate, SimpleDateFormat simple_dateFormat)
Get a Date object from the potential date string and SimpleDateFormat.
s_potentialDate
- String containing a date that conforms to s_dateFormat. May not be null.simple_dateFormat
- The SimpleDateFormat that s_potentialDate must conform to. May not be null.simple_dateFormat.parse(s_potentialDate)
public boolean isEmail(String s_potentialEmail)
Is the string a legally formatted email address?
s_potentialEmail
- The string to analyze.public boolean isBoolean(String s_potentialBoolean)
Does the string contain a valid boolean value?. Note that the behavior of this function is distinct from java.lang.Boolean.valueOf.
s_potentialBoolean
- The string to analyze.public boolean isInteger(String s_potentialInteger)
Is the string a valid integer?. An integer is a number without a decimal point.
Equal to isNumber(s_potentialDigit, false)
public boolean isDecimal(String s_potentialDigit)
Is the string a valid decimal number?. A decimal number may or may not have a decimal point.
Equal to isNumber(s_potentialDigit, true)
public boolean isNumber(String s_potentialDigit, boolean b_decimalAllowed)
Is the string a valid digit?
A digit is defined with the following rules:
TODO: A critical difference between this and getInt: This function does string analysis, and therefore a huge number (8374018734087120847104387208472784) is considered valid according to this function, while invalid according to getInt (would throw an exception)
s_potentialDigit
- The string to analyze.b_decimalAllowed
- If true, then the digit is allowed to have (exactly one) decimal point. If false, the digit is not allowed to have a decimal point, and therefore must be an integer.public final i_i_i getContainedIdxs(String s_x, String s_y)
If either string is contained in or equal to the other, get information describing the containment.
getContainedIdx(getSOBS(s_x, "getContainedIdx"), getSOBS(s_y, "getContainedIdx"))
public final i_i_i getContainedIdxs(String s_x, String s_y, GCICTwo gcic_two)
If either string is contained in (or equal to) the other, get information describing the containment.
getContainedIdx(getSOBS(s_x, "getContainedIdx"), getSOBS(s_y, "getContainedIdx"), gcic_two)
The array is created only once, and populated in this function repeatedly.
public final i_i_i getContainedIdxs(String[] a_string)
If any string is contained in (or equal to) any other, get information describing the containment.
Equal to getContainedIdxs(getAOSOBS(a_string), (new GCIConfig()))
public final i_i_i getContainedIdxs(String[] a_string, GCIConfig gci_config)
If any string is contained in any other, get information describing the containment.
Equal to getContainedIdxs(getAOSOBS(a_string), (new GCIConfig()))
public final String getQuotedLines(String s_tr)
Get a copy of the String where each line is quoted.
getQuotedLines(getSOBSB(s_tr, sUS + "getQuotedLines")).toString()
public final String getQuotedLines(String s_tr, String s_quote)
Get a copy of the String where each line is quoted.
getQuotedLines(getSOBSB(s_tr, sUS + "getQuotedLines"), s_quote).toString()
public final String getQuotedLines(String s_tr, String s_quoteStart, String s_quoteEnd)
Get a copy of the String where each line is quoted.
getQuotedLines(getSOBSB(s_tr, sUS + "getQuotedLines"), s_quoteStart, s_quoteEnd).toString()
public final String getQuotedLines(String s_tr, String s_quoteStart, String s_quoteEnd, String s_lineSep)
Get a copy of the String where each line is quoted.
getQuotedLines(getSOBSB(s_tr, sUS + "getQuotedLines"), s_quoteStart, s_quoteEnd, s_lineSep).toString()
public boolean isHexidecimal(String s_potentialHex)
Is the value of the String a valid hexidecimal number?
isHexidecimal(getSOBS(s_potentialHex, "s_potentialHex", sUS + ".isHexidecimal"))
public boolean isTabSpace(String s_potentialTabSpace)
Does the String contain only whitespace?
s_potentialTabSpace
- The String analyzed, to see if it contains only whitespace characters. May not be null or zero characters in length.isTabSpace(getSOBS(s_potentialTabSpace, "s_potentialTabSpace", sUS + ".isTabSpace"))
public boolean hasNoTabSpace(String s_tr)
Does the String not contain any whitespace characters?
s_tr
- The String analyzed, to see if it contains only non-whitespace characters. May not be null or zero characters in length.hasNoTabSpace(getSOBS(s_tr, sUS + ".hasNoTabSpace"))
public final String getDupAppend(String s_tr, String s_toDuplicate, int i_dupCount)
Get a copy of the String, after appending a duplicated string onto it.
dupAppend(getSOBSB(s_tr, sUS + ".getDupAppend"), s_toDuplicate, i_dupCount).toString()
public String getDuped(String s_tr, int i_dupCount)
Get the priovided string, duplicated.
getDupAppend("", s_tr, i_dupCount)
public final int getIdxOf1stNonWS(String s_tr)
Get the array index of the first non-white-space character.
getIdxOf1stNonWS(getSOBS(s_tr, sUS + ".getIdxOf1stNonWS"))
public final int getIdxOfLastNonWS(String s_tr)
Get the array index of the last non-white-space character.
getIdxOfLastNonWS(getSOBS(s_tr, sUS + ".getIdxOfLastNonWS"))
public final int getIdxOf1stCharNIA(String s_tr, char[] a_char)
Get the array index of the first character that is not a member of the array.
getIdxOf1stCharNIA(getSOBS(s_tr, sUS + "getIdxOf1stCharNIA"), a_char)
public final int getIdxOf1stCharNIA(String s_tr, char[] a_char, boolean b_validateAOC)
Get the array index of the first character that is not a member of the array.
getIdxOf1stCharNIA(getSOBS(s_tr, sUS + "getIdxOf1stCharNIA"), a_char, 0, s_tr.length(), b_validateAOC)
public final int getIdxOf1stCharNIA(String s_tr, char[] a_char, int i_idxStart, int i_idxAfterEnd)
Get the array index of the first character that is not a member of the array.
getIdxOf1stCharNIA(getSOBS(s_tr, sUS + "getIdxOf1stCharNIA"), a_char, i_idxStart, i_idxAfterEnd)
public final int getIdxOf1stCharNIA(String s_tr, char[] a_char, int i_idxStart, int i_idxAfterEnd, boolean b_validateAOC)
Get the array index of the first character that does not exist in the array.
getIdxOf1stCharNIA(getSOBS(s_tr, sUS + "getIdxOf1stCharNIA"), a_char, i_idxStart, i_idxAfterEnd, b_validateAOC)
public final int getIdxOfLastCharNIA(String s_tr, char[] a_char)
Get the array index of the last character that is not a member of the array.
getIdxOfLastCharNIA(getSOBS(s_tr, sUS + "getIdxOfLastCharNIA"), a_char)
public final int getIdxOfLastCharNIA(String s_tr, char[] a_char, boolean b_validateAOC)
Get the array index of the last character that is not a member of the array.
getIdxOfLastCharNIA(getSOBS(s_tr, sUS + "getIdxOfLastCharNIA"), a_char, 0, length(), b_validateAOC)
public final int getIdxOfLastCharNIA(String s_tr, char[] a_char, int i_idxStart, int i_idxAfterEnd)
Get the array index of the last character that is not a member of the array.
getIdxOfLastCharNIA(getSOBS(s_tr, sUS + "getIdxOfLastCharNIA"), a_char, i_idxStart, i_idxAfterEnd)
public final int getIdxOfLastCharNIA(String s_tr, char[] a_char, int i_idxStart, int i_idxAfterEnd, boolean b_validateAOC)
Get the array index of the last character that does not exist in the array.
getIdxOfLastCharNIA(getSOBS(s_tr, sUS + "getIdxOfLastCharNIA"), a_char, i_idxStart, i_idxAfterEnd, b_validateAOC)
public final String getVisible(String s_tr)
Get a copy of the String, where the contents' invisible characters are made visible.
getVisible(getSOBSB(s_tr, sUS + ".getVisible").toString()
public boolean isLetterDigitUnderscore(String s_tr)
Does the string contain only letters, digits and underscores?
isLetterDigitUnderscore(getSOBS(s_tr, sUS + ".isLetterDigitUnderscore"))
public boolean hasLettersOrInAOC(String s_tr, boolean b_digitsOkOpt, char[] ac_legal)
Does the string contain only letters and (other provided) legal characters?
hasLettersOrInAOC(getSOBS(s_tr, sUS + ".hasLettersOrInAOC"), b_digitsOkOpt, ac_legal)
public boolean hasLettersOrInAOC(String s_tr, boolean b_digitsOkOpt, char[] ac_legal, boolean b_validateAOC)
Does the string contain only letters and (other provided) legal characters?
hasLettersOrInAOC(getSOBS(s_tr, sUS + ".hasLettersOrInAOC"), b_digitsOkOpt, ac_legal, b_validateAOC)
public boolean hasDigitsOrInAOC(String s_tr, boolean b_lettersOkOpt, char[] ac_legal)
Does the string contain only digits and (other provided) legal characters?
hasDigitsOrInAOC(getSOBS(s_tr, sUS + ".hasDigitsOrInAOC"), b_lettersOkOpt, ac_legal)
public boolean hasDigitsOrInAOC(String s_tr, boolean b_lettersOkOpt, char[] ac_legal, boolean b_validateAOC)
Does the string contain only digits and (other provided) legal characters?
hasDigitsOrInAOC(getSOBS(s_tr, sUS + ".hasDigitsOrInAOC"), b_lettersOkOpt, ac_legal, b_validateAOC)
public boolean hasLDOrInAOC(String s_tr, char[] ac_legal)
Does the string contain only letters, digits and (other provided) legal characters?
hasLDOrInAOC(getSOBS(s_tr, sUS + ".hasLDOrInAOC"), ac_legal)
public boolean hasLDOrInAOC(String s_tr, char[] ac_legal, boolean b_validateAOC)
Does the string contain only letters, digits and (other provided) legal characters?
hasLDOrInAOC(getSOBS(s_tr, sUS + ".hasLDOrInAOC"), ac_legal, b_validateAOC)
public boolean hasLegalChars(String s_tr, char[] ac_legal)
Does the string contain only legal characters?
hasLegalChars(getSOBS(s_tr, sUS + ".hasLegalChars"), ac_legal)
public boolean hasLegalChars(String s_tr, char[] ac_legal, boolean b_validateAOC)
Does the string contain only legal characters?
isLegal(getSOBS(s_tr, sUS + ".hasLegalChars"), false, false, ac_legal, b_validateAOC)
public boolean isLegal(String s_tr, boolean b_lettersOkOpt, boolean b_digitsOkOpt, char[] ac_legal)
Does the string contain only legal characters?
isLegal(getSOBS(s_tr, sUS + ".isLegal"), b_lettersOkOpt, b_digitsOkOpt, ac_legal)
public boolean isLegal(String s_tr, boolean b_lettersOkOpt, boolean b_digitsOkOpt, char[] ac_legal, boolean b_validateAOC)
Does the string contain only legal characters?
isLegal(getSOBS(s_tr, sUS + ".isLegal"), b_lettersOkOpt, b_digitsOkOpt, ac_legal, b_validateAOC)
public boolean isNotLettersOrInAOC(String s_tr, boolean b_digitsBadOpt, char[] ac_legal)
Does the string not contain any letters or (other provided) illegal characters?
isNotLettersOrInAOC(getSOBS(s_tr, sUS + ".isNotLettersOrInAOC"), b_digitsBadOpt, ac_legal)
public boolean isNotLettersOrInAOC(String s_tr, boolean b_digitsBadOpt, char[] ac_legal, boolean b_validateAOC)
Does the string not contain any letters or (other provided) illegal characters?
isNotLettersOrInAOC(getSOBS(s_tr, sUS + ".isNotLettersOrInAOC"), b_digitsBadOpt, ac_legal, b_validateAOC)
public boolean isNotDigitsOrInAOC(String s_tr, boolean b_lettersBadOpt, char[] ac_legal)
Does the string not contain any digits or (other provided) illegal characters?
isNotDigitsOrInAOC(getSOBS(s_tr, sUS + ".isNotDigitsOrInAOC"), b_digitsBadOpt, ac_legal)
public boolean isNotDigitsOrInAOC(String s_tr, boolean b_lettersBadOpt, char[] ac_legal, boolean b_validateAOC)
Does the string not contain any digits or (other provided) illegal characters?
isNotDigitsOrInAOC(getSOBS(s_tr, sUS + ".isNotDigitsOrInAOC"), b_lettersBadOpt, ac_legal, b_validateAOC)
public boolean isNotLDOrInAOC(String s_tr, char[] ac_legal)
Does the string not contain any letters, digits or (other provided) illegal characters?
isNotLDOrInAOC(getSOBS(s_tr, sUS + ".isNotLDOrInAOC"), ac_legal)
public boolean isNotLDOrInAOC(String s_tr, char[] ac_legal, boolean b_validateAOC)
Does the string not contain any letters, digits or (other provided) illegal characters?
isNotLDOrInAOC(getSOBS(s_tr, sUS + ".isNotLDOrInAOC"), ac_legal, b_validateAOC)
public boolean hasNoIllegalChars(String s_tr, char[] ac_illegal)
Does the string not contain any illegal characters?
hasNoIllegalChars(getSOBS(s_tr, sUS + ".hasNoIllegalChars"), ac_illegal)
public boolean hasNoIllegalChars(String s_tr, char[] ac_illegal, boolean b_validateAOC)
Does the string not contain any illegal characters?
isNotIllegal(getSOBS(s_tr, sUS + ".hasNoIllegalChars"), false, false, ac_illegal, b_validateAOC)
public boolean isNotIllegal(String s_tr, boolean b_lettersBadOpt, boolean b_digitsBadOpt, char[] ac_illegal)
Does the string not contain any illegal characters?
isNotIllegal(getSOBS(s_tr, sUS + ".isNotIllegal"), b_lettersBadOpt, b_digitsBadOpt, ac_illegal)
public boolean isNotIllegal(String s_tr, boolean b_lettersBadOpt, boolean b_digitsBadOpt, char[] ac_illegal, boolean b_validateAOC)
Does the string not contain any illegal characters?
isNotIllegal(getSOBS(s_tr, sUS + ".isNotLegal"), b_lettersBadOpt, b_digitsBadOpt, ac_illegal, b_validateAOC)
public StringBuffer getSB(String s_tr)
Create an SOBStringBuffer with the String.
(new StringBuffer(s_tr))
If s_tr is non-null.public final String getReplaceAll(String s_tr, String s_replaceWhat, String s_replaceWith)
Return a copy of the provided string, in which all occurances are replaced.
getReplaceAll(getSOBSB(s_tr, sUS + ".getReplaceAll"), s_replaceWhat, s_replaceWith)
public final String getReplaceUntil(String s_tr, String s_replaceWhat, String s_replaceWith)
Replace all occurances, with multiple passes, until no instances of the search string remain.
getReplaceUntil(getSOBSB(s_tr, sUS + ".getReplaceUntil"), s_replaceWhat, s_replaceWith)
public final int getIdxNEToLmnt0(String[] a_string)
What is the first array index containing an int not equal to element zero?
This is useful in unit tests that tests multiple versions of the same function, when you want to ensure that each returns the same value.
a_int
- The int array to analyze. May not be null or equal to zero elements in length. Element zero may not be null.public final SOBString getSOBS(String s_tr, String s_callingClsFnc)
Create an SOBString from the String.
getSOBS(s_tr, sUS + ".s_tr", s_callingClsFnc)
public final SOBString getSOBS(String s_tr, String s_sDescription, String s_callingClsFnc)
Create an SOBString from the String.
s_tr
- The String to create a new SOBString with. May not be null.s_sDescription
- The descriptive name of s_tr, for potential error messages.s_callingClsFnc
- The function from which the potential error message should appear as if it is coming from.(new SOBString(s_tr))
public final SOBStringBuffer getSOBSB(String s_tr, String s_callingClsFnc)
Create an SOBStringBuffer from the String.
getSOBSB(s_tr, "s_tr", s_callingClsFnc)
public final SOBStringBuffer getSOBSB(String s_tr, String s_sDescription, String s_callingClsFnc)
Create an SOBStringBuffer from the String.
s_tr
- The String to create a new SOBStringBuffer with. May not be null.s_sDescription
- The descriptive name of s_tr, for potential error messages.s_callingClsFnc
- The function from which the potential error message should appear as if it is coming from.(new SOBStringBuffer(s_tr))
public final SOBString[] getAOSOBS(String[] a_string)
Get an array of SOBStrings from the array of strings.
a_string
- The array of strings to create an array of SOBStrings from.public final SOBStringBuffer[] getAOSOBSB(String[] a_string)
Get an array of SOBStringBuffers from the array of strings.
a_string
- The array of strings to create an array of SOBStringBuffers from.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 1997-2003, Jeff Epstein, All Rights Reserved. See top of source code files for copyright notice.
http://sourceforge.net/projects/xbnjava