Search results
Results from the WOW.Com Content Network
value: The value to convert to a string. This can be any Lua value. This parameter is optional, and defaults to nil. options: A table of options. This parameter is optional. The following options can be specified in the options table: pretty: If true, output the string in "pretty" format (as in pretty-printing). This will add new lines and ...
value: The value to convert to a string. This can be any Lua value. This parameter is optional, and defaults to nil. options: A table of options. This parameter is optional. The following options can be specified in the options table: pretty: If true, output the string in "pretty" format (as in pretty-printing). This will add new lines and ...
No description. Template parameters [Edit template data] This template prefers block formatting of parameters. Parameter Description Type Status Module Name 1 file Module page name (without namespace). Default: First sub-page of the "Global Lua Modules" root page or the top-level page name. String suggested Infobox Image image Infobox image. File optional Caption caption Infobox image caption ...
The English Wikipedia has several templates and Lua modules which can format or manipulate strings. In this context a "string" is any piece of text forming part of a page. This help page covers a few useful techniques; look in the navbox below for the full catalogue of templates.
Note: Lua patterns are not regular expressions in the traditional POSIX sense, and they are not even a subset of regular expressions. But they share many constructs with regular expressions (more below). Lua patterns are used to define, find and handle a pattern in a string. It can do the common search and replace action in a text, but it has ...
Lua has a Boolean data type, but non-Boolean values can also behave as Booleans. The non-value nil evaluates to false, whereas every other data type value evaluates to true. This includes the empty string "" and the number 0, which are very often considered false in other languages.
The string-search functions in Lua script can run extremely fast, comparing millions of characters per second. For example, a search of a 40,000-character article text, for 99 separate words (passed as 99 parameters in a template), ran within one second of Lua CPU clock time.
If it isn't a table, it's a string, a number, a boolean, a function, or a nil. Libraries are tables. string.gmatch is the "gmatch" entry in the table named by the global variable string. Arguments that you receive from MediaWiki are tables. But they're a bit special. Arrays are tables that follow a specific convention.