public final class KeywordsHighlight
extends java.lang.Object
| Constructor and Description |
|---|
KeywordsHighlight(java.lang.String words,
java.lang.String highlightColor,
java.lang.String cssClassName)
Parse keyword input string and populate keywords array
|
| Modifier and Type | Method and Description |
|---|---|
int |
getFirstHighlightIndex()
Gets the firstHighlightIndex attribute of the KeywordsHighlight
object--when keyword highlighting is performed, firstHighlightIndex is
loaded with the index of the first occurrence of a keyword within the given
string.
|
java.lang.String |
highlight(java.lang.String text,
boolean addWbr)
Given any string of text, return the text with all keywords highlighted.
|
java.lang.String |
replace(java.lang.String in,
java.lang.String find)
Perform string match and replace
|
public KeywordsHighlight(java.lang.String words,
java.lang.String highlightColor,
java.lang.String cssClassName)
words - The new keywords input valuehighlightColor - public java.lang.String highlight(java.lang.String text,
boolean addWbr)
text - addWbr - if true, replace '/' with '/public java.lang.String replace(java.lang.String in,
java.lang.String find)
in - input stringfind - string to match againstpublic int getFirstHighlightIndex()