Class FirstLambda

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

    public class FirstLambda
    extends Object
    implements com.samskivert.mustache.Mustache.Lambda
    Split text by 2 spaces and then return the first entry Register:
     additionalProperties.put("first", new FirstLambda());
     
    Use:
     {{#first}}{{name}}{{/first}}
     
    • Constructor Detail

      • FirstLambda

        public FirstLambda()
    • 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