Search results
Results from the WOW.Com Content Network
Finds the length of an array or of a quasi-array with keys with an optional prefix such as "data1", "data2", etc. It uses an exponential search algorithm to find the length, so as to use as few table lookups as possible. This algorithm is useful for arrays that use metatables (e.g. frame.args) and for quasi-arrays.
Lua can process text strings in excess of 230,000 characters, which allows the formatted contents of article pages to be used as input to string searches. However, there have been some limitations in string contents, such as hidden strings enclosed in nowiki-tag or pre-tag elements.
A table is a sequence, optionally supplemented by named keys: digit["two"]="2". Several table functions like table.concat will only work with the numbered values and ignore named keys. The metatable offers a large, optional set of methods for altering table behavior. For example, you can define a table to be callable like a function.
Toggle the table of contents. ... parameter sublen for requested substring length. ... See expanded description and time-delay formula at: "WT:Lua#Passing 1,000 ...
2 Lua text problems of wikitables and nowiki tags. 2 comments. Toggle the table of contents. Wikipedia talk: Lua string functions. Add languages.
[3] math.floor is a table lookup (of the string "floor") in the (global) math table, for example. Table lookups are slower, at runtime, than local variable lookups. Table lookups in tables such as the args table with its "specialness" are a lot slower. A function in Lua can have up to 250 local variables. [4] So make liberal use of them:
Help:Lua for beginners; Help:Lua debugging – about debugging Lua modules; Wikipedia:Lua style guide – standards to improve the readability of code through consistency; Module:Sandbox provides a pseudo-namespace for experimenting with Lua modules
args is a table containing the module arguments. See the template documentation for more information about the available arguments, and for general caveats about this module's use. The above documentation is transcluded from Module:Table row counter/doc .