Global Addon: Difference between revisions
m Protected "Global Addon" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)) |
mNo edit summary |
||
| Line 1: | Line 1: | ||
== sprintf | == sprintf == | ||
'''string sprintf(fmt, ...)''' | '''string sprintf(fmt, ...)''' | ||
| Line 5: | Line 5: | ||
== printf | == printf == | ||
'''printf(fmt, ...)''' | '''printf(fmt, ...)''' | ||
| Line 11: | Line 11: | ||
== unpack2 | == unpack2 == | ||
'''table unpack2(...)''' | '''table unpack2(...)''' | ||
| Line 17: | Line 17: | ||
== include | == include == | ||
'''[variable result] include(string filename[, boolean force])''' | '''[variable result] include(string filename[, boolean force])''' | ||
Latest revision as of 03:47, 18 February 2015
sprintf
string sprintf(fmt, ...)
(C-style) Format a string and return the result. This function is essentially just symbolic link to string.format() [1].
printf
printf(fmt, ...)
(C-style) Format and print a string. This acts much like io.write() except that it does not append the newline character (\n).
unpack2
table unpack2(...)
Takes a variable argument list and returns them as a table. That is, any arguments fed into this function become a list.
include
[variable result] include(string filename[, boolean force])
"include" (dofile) a file. If 'force' is false or ungiven, this will not include the same file multiple times. The returned value is whatever the file returns (if it is to be executed).
NOTE: This function modified the CWD, both before and after loading the target file.