|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xwiki.rendering.parser.xwiki10.util.CleanUtil
public final class CleanUtil
Contains syntax cleaning helpers.
| Method Summary | |
|---|---|
static java.lang.String |
cleanSpacesAndNewLines(java.lang.String content)
Replace all spaces/new line groupes by one space. |
static java.lang.String |
convertEscape(java.lang.String content)
|
static java.lang.String |
extractVelocity(java.lang.CharSequence content,
FilterContext filterContext)
|
static java.lang.String |
extractVelocity(java.lang.CharSequence content,
FilterContext filterContext,
boolean protect,
boolean inline)
|
static java.lang.String |
removeLeadingNewLines(java.lang.String content)
Remove all the first new lines. |
static java.lang.String |
removeLeadingNewLines(java.lang.String content,
int nb,
boolean replaceWithSpace)
Remove first new lines if there is more than 0 and less or equals to the provided number. |
static java.lang.String |
removeTrailingNewLines(java.lang.String content)
Remove all the last new lines. |
static java.lang.String |
removeTrailingNewLines(java.lang.String content,
int nb,
boolean replaceWithSpace)
Remove last new lines if there is more than 0 and less or equals to the provided number. |
static java.lang.String |
setLeadingNewLines(java.lang.String content,
int nb)
Check the provided string contains enough new lines at the beginning and add the need ones. |
static void |
setTrailingNewLines(java.lang.StringBuffer content,
int nb)
Check the provided string contains enough new lines at the end and add the need ones. |
static java.lang.String |
setTrailingNewLines(java.lang.String content,
int nb)
Check the provided string contains enough new lines at the end and add the need ones. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.lang.String cleanSpacesAndNewLines(java.lang.String content)
content - the content to convert.
public static java.lang.String removeLeadingNewLines(java.lang.String content,
int nb,
boolean replaceWithSpace)
content - the content to convert.nb - the number of new lines to match.replaceWithSpace - indicate if the removed new lines are replaced with a white space.
public static java.lang.String removeTrailingNewLines(java.lang.String content,
int nb,
boolean replaceWithSpace)
content - the content to convert.nb - the number of new lines to match.replaceWithSpace - indicate if the removed new lines are replaced with a white space.
public static java.lang.String setLeadingNewLines(java.lang.String content,
int nb)
content - the content to convert.nb - the number of new lines the string need to contains at the beginning.
public static java.lang.String setTrailingNewLines(java.lang.String content,
int nb)
content - the content to convert.nb - the number of new lines the string need to contains at the end.
public static void setTrailingNewLines(java.lang.StringBuffer content,
int nb)
content - the content to convert.nb - the number of new lines the string need to contains at the end.public static java.lang.String removeLeadingNewLines(java.lang.String content)
content - the content to convert.
public static java.lang.String removeTrailingNewLines(java.lang.String content)
content - the content to convert.
public static java.lang.String convertEscape(java.lang.String content)
content - the content to convert.
public static java.lang.String extractVelocity(java.lang.CharSequence content,
FilterContext filterContext)
public static java.lang.String extractVelocity(java.lang.CharSequence content,
FilterContext filterContext,
boolean protect,
boolean inline)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||