Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

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