|
|||||||||
| Home >> All >> com >> opencms >> flex >> [ util overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.opencms.flex.util
Class CmsStringSubstitution

java.lang.Objectcom.opencms.flex.util.CmsStringSubstitution
- public class CmsStringSubstitution
- extends java.lang.Object
Provides a String substitution functionality with Perl regular expressions.
- Since:
- 5.0
- Version:
- $Revision: 1.6 $
| Field Summary | |
private static java.lang.String |
contextReplace
|
private static java.lang.String |
contextSearch
|
private static int |
DEBUG
DEBUG flag |
| Constructor Summary | |
CmsStringSubstitution()
Default constructor (empty). |
|
| Method Summary | |
static java.lang.String |
escapePattern(java.lang.String source)
Escapes a String so it may be used as a Perl5 regular expression. |
static java.lang.String |
substitute(java.lang.String content,
java.lang.String searchString,
java.lang.String replaceItem)
Substitutes searchString in content with replaceItem. |
static java.lang.String |
substituteContextPath(java.lang.String htmlContent,
java.lang.String context)
Substitutes the OpenCms context path (e.g. |
static java.lang.String |
substituteFirst(java.lang.String content,
java.lang.String searchString,
java.lang.String replaceItem)
Substitutes first occurance of searchString in content with replaceItem. |
static java.lang.String |
substitutePerl(java.lang.String content,
java.lang.String searchString,
java.lang.String replaceItem,
java.lang.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 |
| Field Detail |
DEBUG
private static final int DEBUG
- DEBUG flag
- See Also:
- Constant Field Values
contextSearch
private static java.lang.String contextSearch
contextReplace
private static java.lang.String contextReplace
| Constructor Detail |
CmsStringSubstitution
public CmsStringSubstitution()
- Default constructor (empty).
| Method Detail |
substitute
public static java.lang.String substitute(java.lang.String content, java.lang.String searchString, java.lang.String replaceItem)
- Substitutes searchString in content with replaceItem.
substituteFirst
public static java.lang.String substituteFirst(java.lang.String content, java.lang.String searchString, java.lang.String replaceItem)
- Substitutes first occurance of searchString in content with replaceItem.
substitutePerl
public static java.lang.String substitutePerl(java.lang.String content, java.lang.String searchString, java.lang.String replaceItem, java.lang.String occurences)
- Substitutes searchString in content with replaceItem.
substituteContextPath
public static java.lang.String substituteContextPath(java.lang.String htmlContent, java.lang.String context)
- Substitutes the OpenCms context path (e.g. /opencms/opencms/) in a HTML page with a
special variable so that the content also runs if the context path of the server changes.
escapePattern
public static java.lang.String escapePattern(java.lang.String source)
- Escapes a String so it may be used as a Perl5 regular expression.
This method replaces the following characters in a String:
{}[]()\$^.*+/
|
|||||||||
| Home >> All >> com >> opencms >> flex >> [ util overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
com.opencms.flex.util.CmsStringSubstitution