|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.rssowl.util.shop.StringShop
Class provides some methods to handle / work with Strings.
Field Summary | |
static String |
AUTH_TOKENIZER
Custom Tokenizer for Authentication Strings |
static String |
CAT_TOKENIZER
Custom Tokenizer for Category Path |
Constructor Summary | |
private |
StringShop()
This utility class constructor is hidden |
Method Summary | |
static String |
createAnchor(String url)
Create a HTML anchor from the given URL. |
static String |
createFileName(String str)
Create a valid filename from the given String. |
static String |
hrTrim(String str,
int limit)
Trim the given String to the given Limit. |
static boolean |
isset(String str)
Returns TRUE in case the given String has a value that is not "". |
static boolean |
isTerminating(String ch)
Check if a given char is a terminating an URL. |
static boolean |
isWhiteSpaceOrEmpty(String str)
Returns TRUE if the String only cosists of whitespaces or is null / empty. |
static String |
pointTrim(String str,
int length,
boolean escapeMnemonics)
Trims the given String to the given length and appends "..." |
static String |
printf(String str,
String[] wildcard,
String[] substitution)
Substitute wildcards in a String and return it |
static String |
replaceAll(String str,
String search,
String replace)
This method does exactly the same as String.replaceAll() with the difference that no regular expressions are used to perform the replacement. |
static String |
stripTags(String str)
Remove HTML tags from the given String |
static Vector |
toVector(String[] array)
Create a Vector containing all Strings from the String array |
static String |
unicodeToEntities(String str)
Convert the non ASCII-characters of a String into Unicode HTML entities. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String AUTH_TOKENIZER
public static final String CAT_TOKENIZER
Constructor Detail |
private StringShop()
Method Detail |
public static String createAnchor(String url)
url
- The URL of the new anchor
public static String createFileName(String str)
str
- The String to convert to a valid filename.
public static String hrTrim(String str, int limit)
str
- The String to Trimlimit
- The max. number of characters
public static boolean isset(String str)
str
- The String to check
public static boolean isTerminating(String ch)
ch
- Any char
public static boolean isWhiteSpaceOrEmpty(String str)
str
- The string to check
public static String pointTrim(String str, int length, boolean escapeMnemonics)
str
- The String to Trimlength
- The max. length of the StringescapeMnemonics
- If TRUE all "&" will be replaced with "&&"
public static String printf(String str, String[] wildcard, String[] substitution)
str
- The String to formatwildcard
- Array of wildcardssubstitution
- Array of wildcards for the substitution of the
wildcards.
public static String replaceAll(String str, String search, String replace)
str
- The source String to search and replacesearch
- The search term that should get replacedreplace
- The value that replaces the search term
public static String stripTags(String str)
str
- The String to remove the Tags from
public static Vector toVector(String[] array)
array
- The array to convert to a Vector
public static String unicodeToEntities(String str)
str
- The String to convert
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |