lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 2015-06-12, at 6:46 PM, Rena <hyperhacker@gmail.com> wrote:
> command = input:urldecode():lower():trim():split(' ')

You can do this:
command = filter.urldecode.lower.trim.split(' ')(input) 

One of the nice things about this is that the filter chain can be cached easily:

f = filter.urldecode.lower.trim.split(' ')
command = f(input)
command2 = f(input2)