|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.opencms.flex.util.CmsStringSubstitution
Provides a String substitution functionality with Perl regular expressions.
| Constructor Summary | |
CmsStringSubstitution()
Default constructor (empty). |
|
| Method Summary | |
static String |
escapePattern(String source)
Escapes a String so it may be used as a Perl5 regular expression. |
static String |
substitute(String content,
String searchString,
String replaceItem)
Substitutes searchString in content with replaceItem. |
static String |
substituteContextPath(String htmlContent,
String context)
Substitutes the OpenCms context path (e.g. |
static String |
substituteFirst(String content,
String searchString,
String replaceItem)
Substitutes first occurance of searchString in content with replaceItem. |
static String |
substitutePerl(String content,
String searchString,
String replaceItem,
String occurences)
Substitutes searchString in content with replaceItem. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public CmsStringSubstitution()
| Method Detail |
public static String substitute(String content,
String searchString,
String replaceItem)
content - the content which is scannedsearchString - the String which is searched in contentreplaceItem - the new String which replaces searchString
public static String substituteFirst(String content,
String searchString,
String replaceItem)
content - the content which is scannedsearchString - the String which is searched in contentreplaceItem - the new String which replaces searchString
public static String substitutePerl(String content,
String searchString,
String replaceItem,
String occurences)
content - the content which is scannedsearchString - the String which is searched in contentreplaceItem - the new String which replaces searchStringoccurences - must be a "g" if all occurences of searchString shall be replaced
public static String substituteContextPath(String htmlContent,
String context)
htmlContent - the HTML to replace the context path in
public static String escapePattern(String source)
This method replaces the following characters in a String:
{}[]()\$^.*+/
source - the string to escape
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||