public class FindAndReplaceUtility extends Object
Modifier and Type | Method and Description |
---|---|
static boolean |
hasStringAt(StringBuffer aTextBuffer,
String aFindText,
int aIndex)
Finds the position in the given buffer of the given text beginning at the
given index position.
|
static int |
indexOf(StringBuffer aTextBuffer,
String aFindText,
int aIndex)
Finds the position in the given buffer of the given text beginning at the
given index position.
|
static int |
toReplaced(StringBuffer aTextBuffer,
String aFindText,
String aReplaceText)
Replaces a text by an other text in a StringBuffer.
|
static String |
toReplaced(String aText,
String aFindText,
String aReplaceText)
|
public static int indexOf(StringBuffer aTextBuffer, String aFindText, int aIndex)
aTextBuffer
- The buffer in which to searchaFindText
- The text to be foundaIndex
- The position in the buffer where the search process is to
be started.public static boolean hasStringAt(StringBuffer aTextBuffer, String aFindText, int aIndex)
aTextBuffer
- The buffer in which to searchaFindText
- The text to be foundaIndex
- The position in the buffer where the search process is to
be started.public static int toReplaced(StringBuffer aTextBuffer, String aFindText, String aReplaceText)
aTextBuffer
- The buffer containing text with keywords.aFindText
- The text which has to be replaced.aReplaceText
- The text that should be places over the original.Copyright © 2015. All rights reserved.