Class TrimLambda

  • All Implemented Interfaces:
    com.samskivert.mustache.Mustache.Lambda

    public class TrimLambda
    extends Object
    implements com.samskivert.mustache.Mustache.Lambda
    Remove leading and trailing spaces

    Register:

     additionalProperties.put("trim", new TrimLambda());
     

    Use:

     {{#trim}}{{name}}{{/trim}}
     
    • Constructor Detail

      • TrimLambda

        public TrimLambda()
    • Method Detail

      • execute

        public void execute​(com.samskivert.mustache.Template.Fragment fragment,
                            Writer writer)
                     throws IOException
        Specified by:
        execute in interface com.samskivert.mustache.Mustache.Lambda
        Throws:
        IOException