public class EscapeChar extends Object implements com.samskivert.mustache.Mustache.Lambda
$ => \$.
Register:
additionalProperties.put("escapeDollar", new EscapeChar("(?<!\\\\)\\$", "\\\\\\$"));
Use:
{{#lambda.escapeDollar}}{{name}}{{/lambda.escapeDollar}} | Constructor and Description |
|---|
EscapeChar(String matchPattern,
String replacement)
Constructs a new instance of
EscapeChar, with the desired character to escape |
| Modifier and Type | Method and Description |
|---|---|
void |
execute(com.samskivert.mustache.Template.Fragment fragment,
Writer writer) |
public EscapeChar(String matchPattern, String replacement)
EscapeChar, with the desired character to escapematchPattern - the character to escapereplacement - the escaped characterpublic void execute(com.samskivert.mustache.Template.Fragment fragment,
Writer writer)
throws IOException
execute in interface com.samskivert.mustache.Mustache.LambdaIOExceptionCopyright © 2023. All rights reserved.