Class TitlecaseLambda
java.lang.Object
io.swagger.codegen.v3.generators.handlebars.lambda.TitlecaseLambda
- All Implemented Interfaces:
com.github.jknack.handlebars.Lambda
Converts text in a fragment to title case.
Register:
additionalProperties.put("titlecase", new TitlecaseLambda());
Use:
{{#titlecase}}{{classname}}{{/titlecase}}
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs 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
-
Constructor Details
-
TitlecaseLambda
public TitlecaseLambda()Constructs a new instance ofTitlecaseLambda, which will convert all text in a space delimited string to title-case. -
TitlecaseLambda
Constructs a new instance ofTitlecaseLambda, splitting on the specified delimiter and converting each word to title-case.NOTE: passing
nullresults in a title-casing the first word only.- Parameters:
delimiter- Provided to allow an override for the default space delimiter.
-
-
Method Details
-
apply
- Specified by:
applyin interfacecom.github.jknack.handlebars.Lambda- Throws:
IOException
-