|
02/28/2005 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.epicentric.common.StringUtils
com.vignette.portal.util.StringUtils.
Various static utility methods for manipulating strings. This class need not be instantiated.
| Method Summary | |
static String |
capitalize(String str)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static String |
conformToBase64(String input)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static boolean |
contains(String string1,
String string2)
Deprecated. as of version 4.5. To be removed in 8.0 or later. Replaced with com.vignette.portal.util.StringUtils.contains(String,String) |
static String |
convertEncoding(String oldValue,
String oldCharacterEncoding,
String newCharacterEncoding)
Deprecated. as of version 4.5. To be removed in 8.0 or later. Replaced by com.vignette.portal.util.StringUtils.convertEncoding(String,String,String). |
static String |
convertToDBSafe(String string)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static Object |
convertToType(String string,
Class type)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static int |
countChar(String str,
char find)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static String |
createRandomString(int str_len)
Deprecated. as of version 4.5. To be removed in 8.0 or later. Replace with com.vignette.portal.util.DigestUtils.createRandomString(int) |
static String |
decodeBase64(String input)
Deprecated. as of version 4.5. To be removed in 8.0 or later. Replace with com.vignette.portal.util.Base64Utils.decode(String) |
static byte[] |
decodeBase64ToBytes(String input)
Deprecated. as of version 4.5. To be removed in 8.0 or later. Replace with com.vignette.portal.util.Base64Utils.decode(String) |
static String |
decodeXMLText(String text)
Deprecated. as of version 4.5. To be removed in 8.0 or later. Replaced by WebUtils.xmlEntitiesToChars(String). |
static String |
decrypt(String encrypted_string)
Deprecated. as of version 4.5. To be removed in 8.0 or later. Replace with com.vignette.portal.util.Base64Utils.decode(String) |
static String |
encodeBase64(byte[] input)
Deprecated. as of version 4.5. To be removed in 8.0 or later. Replace with com.vignette.portal.util.Base64Utils.encode(byte[]) |
static String |
encodeBase64(String input)
Deprecated. as of version 4.5. To be removed in 8.0 or later. Replace with com.vignette.portal.util.Base64Utils.encode(String) |
static String |
encodeXMLText(String text)
Deprecated. as of version 4.5. To be removed in 8.0 or later. Replaced by WebUtils.charsToXMLEntities(String). |
static String |
encrypt(String clear_string)
Deprecated. as of version 4.5. To be removed in 8.0 or later. Replace with com.vignette.portal.util.Base64Utils.encode(String) |
static boolean |
equals(String string1,
String string2)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No Replacement. |
static boolean |
equalsOrNull(String string1,
String string2)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No Replacement. |
static String |
escapeQuotes(String nonHTML)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static int |
findExactInArray(String targetString,
String[] matchSet)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static int |
findInArray(String targetString,
String[] matchSet,
boolean ignoreCase)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static int |
findInArrayIgnoreCase(String targetString,
String[] matchSet)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static String[] |
getArray(Enumeration e)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static String[] |
getArray(Hashtable list)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static String[] |
getArray(OrderedHashtable list)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static Object[] |
getArray(String string)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static String[] |
getArray(Vector list)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static String[] |
getArrayOfKeys(Hashtable list)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static String[] |
getArrayOfKeys(OrderedHashtable list)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static boolean |
getBoolean(String string)
Deprecated. as of version 4.5. To be removed in 8.0 or later. Use Boolean.valueOf(String).booleanValue(). |
static boolean |
getBoolean(String string,
boolean defaultBoolean)
Deprecated. as of version 4.5. To be removed in 8.0 or later. Replaced with com.vignette.portal.util.StringUtils.parseBoolean(String, boolean) |
static byte |
getByte(String string)
Deprecated. as of version 4.5. To be removed in 8.0 or later. Replaced with com.vignette.portal.util.StringUtils.parseByte(String, byte) |
static char |
getChar(String string)
Deprecated. as of version 4.5. To be removed in 8.0 or later. Use String.charAt(0);. |
static double |
getDouble(String string)
Deprecated. as of version 4.5. To be removed in 8.0 or later. Replaced with com.vignette.portal.util.StringUtils.parseDouble(String, double) |
static float |
getFloat(String string)
Deprecated. as of version 4.5. To be removed in 8.0 or later. Replaced with com.vignette.portal.util.StringUtils.parseFloat(String, float) |
static int |
getInt(String string)
Deprecated. as of version 4.5. To be removed in 8.0 or later. Replaced with com.vignette.portal.util.StringUtils.parseInt(String, int) |
static int |
getInt(String string,
int default_value)
Deprecated. as of version 4.5. To be removed in 8.0 or later. Replaced with com.vignette.portal.util.StringUtils.parseInt(String, int) |
static long |
getLong(String string)
Deprecated. as of version 4.5. To be removed in 8.0 or later. Replaced with com.vignette.portal.util.StringUtils.parseLong(String, long) |
static long |
getLong(String string,
long default_value)
Deprecated. as of version 4.5. To be removed in 8.0 or later. Replaced with com.vignette.portal.util.StringUtils.parseLong(String, long) |
static String |
getMD5(String input_string)
Deprecated. as of version 4.5. To be removed in 8.0 or later. Replace with com.vignette.portal.util.DigestUtils.getMD5(String) |
static String |
getSHA1(String input_string)
Deprecated. as of version 4.5. To be removed in 8.0 or later. Replace with com.vignette.portal.util.DigestUtils.getSHA1(String) |
static short |
getShort(String string)
Deprecated. as of version 4.5. To be removed in 8.0 or later. Replaced with com.vignette.portal.util.StringUtils.parseShort(String, short) |
static String |
getString(Object string)
Deprecated. as of version 4.5. To be removed in 8.0 or later. Replaced with com.vignette.portal.util.StringUtils.toString(Object) |
static String |
getString(Object string,
String default_value)
Deprecated. as of version 4.5. To be removed in 8.0 or later. Replaced with com.vignette.portal.util.StringUtils.toString(Object, String, boolean) |
static String |
getString(String initialValue,
String defaultValue)
Deprecated. as of version 4.5. To be removed in 8.0 or later. Replaced with com.vignette.portal.util.StringUtils.toString(String, String, boolean) |
static String[] |
getStringArray(String string)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static String |
getTrimString(Object string)
Deprecated. as of version 4.5. To be removed in 8.0 or later. Replaced with com.vignette.portal.util.StringUtils.trim(Object) |
static Class |
getType(String type)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static Vector |
getVector(String string)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static int |
indexOf(String src_string,
int ch,
boolean ignore_case)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static int |
indexOf(String src_string,
int ch,
int fromIndex,
boolean ignore_case)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static int |
indexOf(String src_string,
String str,
boolean ignore_case)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static int |
indexOf(String src_string,
String str,
int fromIndex,
boolean ignore_case)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static int |
indexOfIgnoreCase(String src_string,
int ch)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static int |
indexOfIgnoreCase(String src_string,
int ch,
int fromIndex)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static int |
indexOfIgnoreCase(String src_string,
String str)
Deprecated. as of version 4.5. To be removed in 8.0 or later. Replace with com.vignette.portal.util.StringUtils.indexOfIgnoreCase(String, String) |
static int |
indexOfIgnoreCase(String src_string,
String str,
int fromIndex)
Deprecated. as of version 4.5. To be removed in 8.0 or later. Replace with com.vignette.portal.util.StringUtils.indexOfIgnoreCase(String, String, int) |
static boolean |
isEmpty(Object string)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No Replacement. This effect can be accomplished using the expression ((obj==null ? "" : obj.toString()).length()==0). |
static boolean |
isEmpty(String string)
Deprecated. as of version 4.5. To be removed in 8.0 or later. Replaced with com.vignette.portal.util.StringUtils.isEmpty(String) |
static boolean |
isEmptyIgnoreWhitespace(Object string)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No Replacement. This effect can be accomplished using the expression ((obj==null ? "" : obj.toString()).trim().length()==0). |
static boolean |
isEmptyIgnoreWhitespace(String string)
Deprecated. as of version 4.5. To be removed in 8.0 or later. Replaced with com.vignette.portal.util.StringUtils.isEmptyIgnoreWhitespace(String) |
static boolean |
isHexidecimalDigit(char digit)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static boolean |
isIDChar(char ch)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static boolean |
isInteger(String string)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static boolean |
isValidEmailAddress(String addr)
Deprecated. as of version 4.5. To be removed in 8.0 or later. E-mail addresses can be valided through the standard extension javax.mail.internet package. |
static boolean |
isWellFormedIDString(String id)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static int |
lastIndexOf(String src_string,
int ch,
boolean ignore_case)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static int |
lastIndexOf(String src_string,
int ch,
int fromIndex,
boolean ignore_case)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static int |
lastIndexOf(String src_string,
String str,
boolean ignore_case)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static int |
lastIndexOf(String src_string,
String str,
int fromIndex,
boolean ignore_case)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static int |
lastIndexOfIgnoreCase(String src_string,
int ch)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static int |
lastIndexOfIgnoreCase(String src_string,
int ch,
int fromIndex)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static int |
lastIndexOfIgnoreCase(String src_string,
String str)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static int |
lastIndexOfIgnoreCase(String src_string,
String str,
int fromIndex)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static boolean |
matchExactInArray(String inString,
String[] matchSet)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static boolean |
matchInArray(String inString,
String[] matchSet,
boolean ignoreCase)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static boolean |
matchInArrayIgnoreCase(String inString,
String[] matchSet)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static void |
quicksort(CollationKey[] keys,
int l,
int u)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static String |
remove(String src,
String delims)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static String |
removeString(String src,
String kill)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static String |
removeWhitespace(String input)
Deprecated. as of version 4.5. To be removed in 8.0 or later. Replace with com.vignette.portal.util.StringUtils.removeWhitespace(String) |
static String |
replace(String input,
String find,
String replace)
Deprecated. as of version 4.5. To be removed in 8.0 or later. Replace with com.vignette.portal.util.StringUtils.replace(String,String,String) |
static String |
replace(String input,
String find,
String replace,
boolean ignoreCase)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static String |
replaceFrom(String input,
String find,
String replace,
int startIndex)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static String |
replaceFrom(String input,
String find,
String replace,
int startIndex,
boolean ignoreCase)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static String |
replaceNext(String input,
String find,
String replace,
int index)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static String |
singleLine(String input,
int max_length)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static int |
skipWhitespace(String string,
int index)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. Use a.indexOf(a.trim().charAt(0)). |
static void |
sortOnKey(String[] contents)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static void |
sortOnKey(Vector string_list)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static String[] |
split(String string,
String delimiter)
Deprecated. as of version 4.5. To be removed in 8.0 or later. Replace with com.vignette.portal.util.StringUtils.split(String, String) |
static String[] |
splitOnString(String src,
String delim)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static boolean |
startsWithXMLHeader(String input)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static byte[] |
stringToASCIIBytes(String str)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static String |
substring(String source,
String beginStr,
String endStr)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static String |
substringByWord(String src,
int start,
int end)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static String |
tabs(int count)
Deprecated. as of version 4.5. To be removed in 8.0 or later. Replace with com.vignette.portal.util.StringUtils.repeat(int, char) |
static String |
toHTML(String nonHTML)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static String |
toOSPath(String path)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static String |
toTitleCase(String str)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static String |
truncate(String string,
int length,
boolean absolute)
Deprecated. as of version 4.5. To be removed in 8.0 or later. Replaced with {@link com.vignette.portal.util.StringUtils#truncate(String,int,boolean) com.vignette.portal.util.StringUtils.truncate(String,int,boolean). |
static String |
wrapString(String string,
int length)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
static String |
wrapStringAsHtml(String string,
int length)
Deprecated. as of version 4.5. To be removed in 8.0 or later. No replacement. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static String getString(Object string)
com.vignette.portal.util.StringUtils.toString(Object)
public static String getString(Object string,
String default_value)
com.vignette.portal.util.StringUtils.toString(Object, String, boolean)
public static String getString(String initialValue,
String defaultValue)
com.vignette.portal.util.StringUtils.toString(String, String, boolean)
initialValue - the intended return stringdefaultValue - the default return stringinitialValue if it is non-null and
contains at least one non-whitespace character, or
defaultValue if initialValue
if emptyStringUtils.isEmptyIgnoreWhitespace(String)public static String getTrimString(Object string)
com.vignette.portal.util.StringUtils.trim(Object)
public static boolean isEmpty(String string)
com.vignette.portal.util.StringUtils.isEmpty(String)
public static boolean isEmpty(Object string)
((obj==null ? "" : obj.toString()).length()==0).
public static boolean isEmptyIgnoreWhitespace(String string)
com.vignette.portal.util.StringUtils.isEmptyIgnoreWhitespace(String)
public static boolean isEmptyIgnoreWhitespace(Object string)
((obj==null ? "" : obj.toString()).trim().length()==0).
public static boolean equals(String string1,
String string2)
public static boolean equalsOrNull(String string1,
String string2)
true if both of them are
null or if they are equal.string1 - the first string to be compared.string2 - the second string to be compared.true if both strins are null or equal.
public static boolean contains(String string1,
String string2)
com.vignette.portal.util.StringUtils.contains(String,String)
public static int skipWhitespace(String string,
int index)
a.indexOf(a.trim().charAt(0)).
string - Source stringindex - Index in source string at which to start search.public static boolean isInteger(String string)
public static boolean getBoolean(String string)
Boolean.valueOf(String).booleanValue().
public static boolean getBoolean(String string,
boolean defaultBoolean)
com.vignette.portal.util.StringUtils.parseBoolean(String, boolean)
public static byte getByte(String string)
com.vignette.portal.util.StringUtils.parseByte(String, byte)
public static short getShort(String string)
com.vignette.portal.util.StringUtils.parseShort(String, short)
public static char getChar(String string)
String.charAt(0);.
public static int getInt(String string)
com.vignette.portal.util.StringUtils.parseInt(String, int)
public static int getInt(String string,
int default_value)
com.vignette.portal.util.StringUtils.parseInt(String, int)
public static long getLong(String string)
com.vignette.portal.util.StringUtils.parseLong(String, long)
public static long getLong(String string,
long default_value)
com.vignette.portal.util.StringUtils.parseLong(String, long)
public static float getFloat(String string)
com.vignette.portal.util.StringUtils.parseFloat(String, float)
public static double getDouble(String string)
com.vignette.portal.util.StringUtils.parseDouble(String, double)
public static Vector getVector(String string)
public static String[] getStringArray(String string)
StringUtils.getVector(String)public static Object[] getArray(String string)
StringUtils.getVector(String)
public static int countChar(String str,
char find)
public static int indexOf(String src_string,
int ch,
boolean ignore_case)
ignore_case - True: ignore case.
public static int indexOfIgnoreCase(String src_string,
int ch)
public static int indexOf(String src_string,
int ch,
int fromIndex,
boolean ignore_case)
src_string - String to be searched.ch - Character to search for.fromIndex - Starting position from which to search.ignore_case - True: ignore case.
public static int indexOfIgnoreCase(String src_string,
int ch,
int fromIndex)
src_string - String to be searched.ch - Character to search for.fromIndex - Starting position from which to search.
public static int lastIndexOf(String src_string,
int ch,
boolean ignore_case)
public static int lastIndexOfIgnoreCase(String src_string,
int ch)
public static int lastIndexOf(String src_string,
int ch,
int fromIndex,
boolean ignore_case)
public static int lastIndexOfIgnoreCase(String src_string,
int ch,
int fromIndex)
public static int indexOf(String src_string,
String str,
boolean ignore_case)
public static int indexOfIgnoreCase(String src_string,
String str)
com.vignette.portal.util.StringUtils.indexOfIgnoreCase(String, String)
public static int indexOf(String src_string,
String str,
int fromIndex,
boolean ignore_case)
public static int indexOfIgnoreCase(String src_string,
String str,
int fromIndex)
com.vignette.portal.util.StringUtils.indexOfIgnoreCase(String, String, int)
public static int lastIndexOf(String src_string,
String str,
boolean ignore_case)
public static int lastIndexOfIgnoreCase(String src_string,
String str)
public static int lastIndexOf(String src_string,
String str,
int fromIndex,
boolean ignore_case)
public static int lastIndexOfIgnoreCase(String src_string,
String str,
int fromIndex)
public static String getMD5(String input_string)
com.vignette.portal.util.DigestUtils.getMD5(String)
public static String getSHA1(String input_string)
com.vignette.portal.util.DigestUtils.getSHA1(String)
public static String encrypt(String clear_string)
com.vignette.portal.util.Base64Utils.encode(String)
StringUtils.decrypt(String)public static String decrypt(String encrypted_string)
com.vignette.portal.util.Base64Utils.decode(String)
StringUtils.encrypt(String)public static String createRandomString(int str_len)
com.vignette.portal.util.DigestUtils.createRandomString(int)
public static String[] split(String string,
String delimiter)
com.vignette.portal.util.StringUtils.split(String, String)
public static String[] splitOnString(String src,
String delim)
delim - is a single token on which to split,
rather than a set of tokens like split(). if delim
is blank, then no splitting happens.StringUtils.split(java.lang.String, java.lang.String)public static String tabs(int count)
com.vignette.portal.util.StringUtils.repeat(int, char)
public static String replace(String input,
String find,
String replace)
com.vignette.portal.util.StringUtils.replace(String,String,String)
public static String replace(String input,
String find,
String replace,
boolean ignoreCase)
public static String replaceFrom(String input,
String find,
String replace,
int startIndex)
public static String replaceFrom(String input,
String find,
String replace,
int startIndex,
boolean ignoreCase)
public static String replaceNext(String input,
String find,
String replace,
int index)
public static String removeWhitespace(String input)
com.vignette.portal.util.StringUtils.removeWhitespace(String)
public static String singleLine(String input,
int max_length)
public static String convertToDBSafe(String string)
public static Object convertToType(String string,
Class type)
public static Class getType(String type)
public static void quicksort(CollationKey[] keys,
int l,
int u)
public static void sortOnKey(String[] contents)
public static void sortOnKey(Vector string_list)
public static String[] getArray(Hashtable list)
public static String[] getArrayOfKeys(Hashtable list)
public static String[] getArray(OrderedHashtable list)
public static String[] getArrayOfKeys(OrderedHashtable list)
public static String[] getArray(Vector list)
public static String[] getArray(Enumeration e)
public static String toHTML(String nonHTML)
public static String escapeQuotes(String nonHTML)
public static String encodeBase64(String input)
com.vignette.portal.util.Base64Utils.encode(String)
public static String encodeBase64(byte[] input)
com.vignette.portal.util.Base64Utils.encode(byte[])
public static String decodeBase64(String input)
com.vignette.portal.util.Base64Utils.decode(String)
public static byte[] decodeBase64ToBytes(String input)
com.vignette.portal.util.Base64Utils.decode(String)
public static String conformToBase64(String input)
public static boolean matchInArray(String inString,
String[] matchSet,
boolean ignoreCase)
inString - String to find in matchSet.matchSet - Array of strings to search.ignoreCase - True: ignore case when comparing.
public static boolean matchInArrayIgnoreCase(String inString,
String[] matchSet)
StringUtils.matchInArray(String, String[], boolean)
public static boolean matchExactInArray(String inString,
String[] matchSet)
StringUtils.matchInArray(String, String[], boolean)
public static int findInArray(String targetString,
String[] matchSet,
boolean ignoreCase)
targetString - String to find in matchSet.matchSet - Array of strings to search.ignoreCase - True: ignore case when comparing.
public static int findExactInArray(String targetString,
String[] matchSet)
StringUtils.findInArray(String, String[], boolean)
public static int findInArrayIgnoreCase(String targetString,
String[] matchSet)
StringUtils.findInArray(String, String[], boolean)public static String toOSPath(String path)
public static String capitalize(String str)
public static String substringByWord(String src,
int start,
int end)
public static String substring(String source,
String beginStr,
String endStr)
source - the string to parse a substring frombeginStr - the starting string boundaryendStr - the ending string boundarysource such that the
following is true:
source = "..." + beginStr + source + endStr + "..."
where "..." is an arbitrary string of zero or more characters
public static String remove(String src,
String delims)
delims - is a list of individual tokens to remove,
not a single string to remove.
public static String removeString(String src,
String kill)
kill - is a single String, not a set of delimiters, to remove
from all occurrances in param src.public static byte[] stringToASCIIBytes(String str)
public static String encodeXMLText(String text)
WebUtils.charsToXMLEntities(String).
& --> & < --> < > --> > " --> " ' --> '
public static String decodeXMLText(String text)
WebUtils.xmlEntitiesToChars(String).
< --> < > --> >
public static boolean isWellFormedIDString(String id)
public static boolean isIDChar(char ch)
public static boolean isHexidecimalDigit(char digit)
public static String convertEncoding(String oldValue,
String oldCharacterEncoding,
String newCharacterEncoding)
throws UnsupportedEncodingException
com.vignette.portal.util.StringUtils.convertEncoding(String,String,String).
oldValue - The original string valueoldCharacterEncoding - The original string encodingnewCharacterEncoding - The replacement string encodingString.getBytes(java.lang.String),
String.String(byte[], java.lang.String)public static boolean startsWithXMLHeader(String input)
input - String to be tested.public static boolean isValidEmailAddress(String addr)
javax.mail.internet package.
This method requires a valid email address to meet the following rules:
addr - the email address to validatetrue if the given address
looks valid as far as this method can determine,
false if the address contains obvious
formatting errors
public static String wrapString(String string,
int length)
length charactersstring - the string to break up into multiple lineslength - the max number of characters per line,
including whitespace characterslength characters occur within the
string between the beginning of the string and the
first newline, between newlines, or between the last
newline and the end of the string
public static String wrapStringAsHtml(String string,
int length)
length
charactersstring - the string to break up into multiple lineslength - the max number of characters per line,
including whitespace characterslength characters occur within the
string between the beginning of the string and the
first <br>, between <br>'s, or between the
last <br> and the end of the stringStringUtils.wrapString(String, int)
public static String truncate(String string,
int length,
boolean absolute)
length characters (or less,
if absolute is false) from the
input stringstring - the string to get characters fromlength - the max number of characters to be returnedabsolute - boolean flag; true to return
exactly length characters from string
or just string if it contains less than
length characters, false to return
as many whole words (non-whitespace character sequences
separated by whitespace) from string as will fit
within length charactersabsolute
is true and length is less than
0 or if absolute is false
and string doesn't begin with any whole words
that are less than length characters in length,
never nullpublic static String toTitleCase(String str)
str - the string to convert to title case
|
02/28/2005 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||