All Packages Class Hierarchy This Package Previous Next Index
Class websphinx.util.Str
java.lang.Object
|
+----websphinx.util.Str
- public abstract class Str
- extends Object
String utility routines.
-
Str()
-
-
escape(String, char, String)
- Escapes metacharacters in a string.
-
indexOfAnyChar(String, String)
- Find first occurence of any of a set of characters.
-
indexOfAnyChar(String, String, int)
- Find first occurence of any of a set of characters, starting
at a specified index.
-
main(String[])
-
-
parseNumber(String)
-
-
replace(String, String, String)
- Replace all occurences of a string.
Str
public Str()
indexOfAnyChar
public static int indexOfAnyChar(String subject,
String chars)
- Find first occurence of any of a set of characters.
- Parameters:
- subject - String in which to search
- chars - Characters to search for
- Returns:
- index of first occurence in subject of a character from chars,
or -1 if no match.
indexOfAnyChar
public static int indexOfAnyChar(String subject,
String chars,
int start)
- Find first occurence of any of a set of characters, starting
at a specified index.
- Parameters:
- subject - String in which to search
- chars - Characters to search for
- start - Starting offset to search from
- Returns:
- index of first occurence (after start) in subject of a character from chars,
or -1 if no match.
replace
public static String replace(String subject,
String original,
String replacement)
- Replace all occurences of a string.
- Parameters:
- subject - String in which to search
- original - String to search for in subject
- replacement - String to substitute
- Returns:
- subject with all occurences of original replaced by replacement
escape
public static String escape(String subject,
char escapeChar,
String metachars)
- Escapes metacharacters in a string.
- Parameters:
- subject - String in which metacharacters are to be escaped
- escapeChar - the escape character (e.g., \)
- metachars - the metacharacters that should be escaped
- Returns:
- subject with escapeChar inserted before every character found in metachars
parseNumber
public static Number parseNumber(String s) throws NumberFormatException
main
public static void main(String args[])
All Packages Class Hierarchy This Package Previous Next Index