org.mov.util
Class Find
java.lang.Object
org.mov.util.Find
public class Find
- extends java.lang.Object
A selection of functions to perform find/replace on strings.
- Author:
- Andrew Leppard
|
Constructor Summary |
Find()
|
|
Method Summary |
static java.lang.String |
replace(java.lang.String source,
java.lang.String pattern,
java.lang.String replacement)
Replace the first occurence of the pattern text with replacement text. |
static java.lang.String |
replaceAll(java.lang.String source,
java.lang.String pattern,
java.lang.String replacement)
Replace all occurences of the pattern text with replacement text. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Find
public Find()
replace
public static java.lang.String replace(java.lang.String source,
java.lang.String pattern,
java.lang.String replacement)
- Replace the first occurence of the pattern text with replacement text.
This function treats all arguments as simple strings.
- Parameters:
source - The source string containing the text to replace.pattern - The pattern to find and replace.replacement - The text to use to replace the pattern.
- Returns:
- The version of the source string after the find/replace.
replaceAll
public static java.lang.String replaceAll(java.lang.String source,
java.lang.String pattern,
java.lang.String replacement)
- Replace all occurences of the pattern text with replacement text.
This function treats all arguments as simple strings.
- Parameters:
source - The source string containing the text to replace.pattern - The pattern to find and replace.replacement - The text to use to replace the pattern.
- Returns:
- The version of the source string after the find/replace.