Open main menu
Home
Random
Donate
Recent changes
Special pages
Community portal
Preferences
About Stockhub
Disclaimers
Search
User menu
Talk
Contributions
Create account
Log in
Editing
Module:Buffer/doc
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Module rating |release<!-- Values: pre-alpha β’ alpha β’ beta β’ release β’ protected -- If a rating not needed/relevant, delete this template call -->}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --> {{High-risk|2,000,000+}} {{TOC right}} {{Module rating|protected}} 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 [[#Buffer object|Module:Buffer objects]] is similar to that of {{Luaref|HTML_library|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 {{code|..}} 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: *{{luaself|:stream|plain=y}} *{{luaself|\-HTML|plain=y}} *{{luaself|pre=Element-|\|plain=y}} *{{luaself|\-variable|plain=y}} *{{luaself|\-nil|plain=y}} *[[#_G object|_G (callable)]] Last but not least, this module has an ordered [[#require'Module:Buffer'.__pairs|__pairs]] which can be more thorough than {{luaref|ipairs||y}} and {{luaref|pairs||y}}. (Even reads nil keys!) The <span title='This is a bad Star Trek joke'>logical uniqueness</span> of this iterator may be reason enough to {{luaref|require|assimilate|y}} Module:Buffer.
Summary:
Please note that all contributions to Stockhub may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Stockhub:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)