Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.
Revision as of 23:40, 10 March 2025 by Prd (talk | contribs) (Replaced content with "{{doc sub}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see Wikipedia:Wikidata) --> {{TOC right}} This was originally developed to optimize string concatenation as a helper method within Module:Asbox, but has been generalized for all modules. The interface for Module:Buffer objects is similar to that of {{Luaref|HTML_library|mw.html}} objects in that you may build complex strings wit...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This is the documentation page for Module:Buffer

This was originally developed to optimize string concatenation as a helper method within Module:Asbox, but has been generalized for all modules.

The interface for Module:Buffer objects is similar to that of mw.html objects in that you may build complex strings with independent child nodes. In most cases, you may use Buffer objects like a normal string, including using .. operator. See also: #String, mw.ustring, and mw.text libraries

Additionally, there are several specialized forms and extended objects, described further in their respective sections:

Buffer:stream

Buffer-HTML

Buffer-variable

Buffer-nil

Last but not least, this module has an ordered __pairs which can be more thorough than ipairs and pairs. (Even reads nil keys!) The logical uniqueness of this iterator may be reason enough to assimilate Module:Buffer.

For Usage

Read on Wikipedia

See also

  • Module:Escape, a lightweight metamodule for customized string character escaping