Class TitlecaseLambda
- java.lang.Object
-
- io.swagger.codegen.v3.generators.handlebars.lambda.TitlecaseLambda
-
- All Implemented Interfaces:
com.github.jknack.handlebars.Lambda
public class TitlecaseLambda extends Object implements 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
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 Objectapply(Object o, com.github.jknack.handlebars.Template template)
-
-
-
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: passing
nullresults in a title-casing the first word only.- Parameters:
delimiter- Provided to allow an override for the default space delimiter.
-
-
Method Detail
-
apply
public Object apply(Object o, com.github.jknack.handlebars.Template template) throws IOException
- Specified by:
applyin interfacecom.github.jknack.handlebars.Lambda- Throws:
IOException
-
-