lua:arguments
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| lua:arguments [2015/02/05 08:24] – created vodur | lua:arguments [2017/02/20 06:28] (current) – vodur | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | arguments( arg_str ) | + | arguments( arg_str |
| + | |||
| + | 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. | ||
| <code lua> | <code lua> | ||
| local args=arguments(" | local args=arguments(" | ||
| - | |||
| tprint(args) | tprint(args) | ||
| </ | </ | ||
| + | |||
| + | < | ||
| + | You say ' | ||
| + | 2=" | ||
| + | 3="ghi jkl" | ||
| + | 4=" | ||
| + | </ | ||
| + | |||
lua/arguments.1423124641.txt.gz · Last modified: 2015/02/05 08:24 by vodur