User Tools

Site Tools


lua:arguments

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
lua:arguments [2015/02/05 08:24] – created vodurlua:arguments [2017/02/20 06:28] (current) vodur
Line 1: Line 1:
-arguments( arg_str )+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.
  
 <code lua> <code lua>
 local args=arguments("abc def 'ghi jkl' mno") local args=arguments("abc def 'ghi jkl' mno")
- 
 tprint(args)​ tprint(args)​
 </code> </code>
 +
 +<code>
 +You say '1="abc"
 +2="def"
 +3="ghi jkl"
 +4="mno"
 +</code>
 +
  
lua/arguments.1423124641.txt.gz · Last modified: 2015/02/05 08:24 by vodur