User Tools

Site Tools


lua:arguments

arguments( arg_str [, keepcase:=false] )

Return type: array of string

Splits arg_str into sub arguments and returns the arguments as a table. Optional 2nd argument is a boolean value specifying whether the case of arguments are preserved. The default is false, meaning all arguments will be converted to lowercase in the returned table.

White space are considered argument boundaries except when single quotes are used. See example below.

local args=arguments("abc def 'ghi jkl' mno")
tprint(args)
You say '1="abc"
2="def"
3="ghi jkl"
4="mno"
lua/arguments.txt · Last modified: 2017/02/20 06:28 by vodur