Class TitlecaseLambda
- java.lang.Object
-
- org.openapitools.codegen.templating.mustache.TitlecaseLambda
-
- All Implemented Interfaces:
com.samskivert.mustache.Mustache.Lambda
public class TitlecaseLambda extends Object implements com.samskivert.mustache.Mustache.Lambda
Converts text in a fragment to title case. Register:additionalProperties.put("titlecase", new TitlecaseLambda());
Use:{{#titlecase}}{{classname}}{{/titlecase}}
-
-
Constructor Summary
Constructors Constructor Description TitlecaseLambda()
Constructs a new instance ofTitlecaseLambda
, which will convert all text in a space delimited string to title-case.TitlecaseLambda(String delimiter)
Constructs a new instance ofTitlecaseLambda
, splitting on the specified delimiter and converting each word to title-case.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute(com.samskivert.mustache.Template.Fragment fragment, Writer writer)
-
-
-
Constructor Detail
-
TitlecaseLambda
public TitlecaseLambda()
Constructs a new instance ofTitlecaseLambda
, which will convert all text in a space delimited string to title-case.
-
TitlecaseLambda
public TitlecaseLambda(String delimiter)
Constructs a new instance ofTitlecaseLambda
, splitting on the specified delimiter and converting each word to title-case. NOTE: passingnull
results in a title-casing the first word only.- Parameters:
delimiter
- Provided to allow an override for the default space delimiter.
-
-
Method Detail
-
execute
public void execute(com.samskivert.mustache.Template.Fragment fragment, Writer writer) throws IOException
- Specified by:
execute
in interfacecom.samskivert.mustache.Mustache.Lambda
- Throws:
IOException
-
-