Search results
Results from the WOW.Com Content Network
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.
Lua is intended to be embedded into other applications, and provides a C API for this purpose. The API is divided into two parts: the Lua core and the Lua auxiliary library. [20] The Lua API's design eliminates the need for manual reference counting (management) in C code, unlike Python's API. The API, like the language, is minimalist.
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 ...
This Lua module is used on approximately 1,880,000 pages, or roughly 3% of all pages. To avoid major disruption and server load, any changes should be tested in the module's /sandbox or /testcases subpages, or in your own module sandbox .
[[Category:Templates based on the String Lua module]] to the <includeonly> section at the bottom of that page. Otherwise, add <noinclude>[[Category:Templates based on the String Lua module]]</noinclude> to the end of the template code, making sure it starts on the same line as the code's last character.
Wikipedia:Lua style guide – standards to improve the readability of code through consistency "What do converted templates look like?" (slideshow) Help:Lua debugging – a how-to guide about debugging Lua modules; Help:Lua for beginners – basic tutorial and pointers; Wikipedia:Lua string functions – string performance considerations and limits
Regular expressions (or regex) are a common and very versatile programming technique for manipulating strings. On Wikipedia you can use a limited version of regex called a Lua pattern to select and modify bits of text from a string. The pattern is a piece of code describing what you are looking for in the string.
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.