public class TitlecaseLambda extends Object implements com.samskivert.mustache.Mustache.Lambda
additionalProperties.put("titlecase", new TitlecaseLambda());Use:
{{#titlecase}}{{classname}}{{/titlecase}}
Constructor and Description |
---|
TitlecaseLambda()
Constructs a new instance of
TitlecaseLambda , which will convert all text
in a space delimited string to title-case. |
TitlecaseLambda(String delimiter)
Constructs a new instance of
TitlecaseLambda , splitting on the specified
delimiter and converting each word to title-case. |
Modifier and Type | Method and Description |
---|---|
void |
execute(com.samskivert.mustache.Template.Fragment fragment,
Writer writer) |
public TitlecaseLambda()
TitlecaseLambda
, which will convert all text
in a space delimited string to title-case.public TitlecaseLambda(String delimiter)
TitlecaseLambda
, splitting on the specified
delimiter and converting each word to title-case.
NOTE: passing null
results in a title-casing the first word only.delimiter
- Provided to allow an override for the default space delimiter.public void execute(com.samskivert.mustache.Template.Fragment fragment, Writer writer) throws IOException
execute
in interface com.samskivert.mustache.Mustache.Lambda
IOException
Copyright © 2018. All rights reserved.