Class SplitFilter

  • All Implemented Interfaces:
    Filter, Importable

    public class SplitFilter
    extends Object
    implements Filter
    split(separator=' ', limit=0) Splits the input string into a list on the given separator separator: defaults to space limit: defaults to 0, limits resulting list by putting remainder of string into last list item
    Author:
    jstehler
    • Constructor Detail

      • SplitFilter

        public SplitFilter()
    • Method Detail

      • filter

        public Object filter​(Object var,
                             JinjavaInterpreter interpreter,
                             String... args)
        Description copied from interface: Filter
        Filter the specified template variable within the context of a render process. {{ myvar|myfiltername(arg1,arg2) }}
        Specified by:
        filter in interface Filter
        Parameters:
        var - the variable which this filter should operate on
        interpreter - current interpreter context
        args - any arguments passed to this filter invocation
        Returns:
        the filtered form of the given variable