Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
IndicWiki Sandbox
Search
Search
English
Log in
Personal tools
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Module:Buffer/doc
(section)
Module
Discussion
English
Read
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit source
View history
General
What links here
Related changes
Special pages
Page information
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!
====Buffer:_out==== {{luaself|:_out|args=sep|args2=ops, sep{{ndash}}list, { default{{ndash}}sep, ..., [#] = sep }|args3=0, sep}} [[#Buffer object|Joins a Buffer]] with {{code|sep}} and appends result to its parent, which is returned. If no parent is found, this is a no-op and returns the same Buffer. When given two or more arguments, this reads the first as {{code|ops}}{{--}}the number of :_out() operations to perform.<ref group="note">The first arg is not type checked but read as ''ops'' only when multiple args are present (or if it is the number 0); i.e., <code>Buffer:_out(2)</code> uses <code>2</code> as a separator. To append to the ''N''th ancestor with no separator, use <code>Buffer:_outs(''N'', nil)</code>.</ref> This applies the first ''sep'' in {{code|sep-list}} for the current Buffer, the second for its parent, the third for its grandparent, and so on. If the last item is a {{luaref|table||y}}, then any ''nil'' in ''sep-list'' default to <code>''table''[1]</code>; any ''false'' mean "no-sep".<ref group="note">Empty strings would produce the same output as false, however, Lua string literals create objects that take up memory until garbage collected.</ref> The table may be the second arg (i.e. ''sep-list'' may be omitted). If it has other keys, then ''table[n]'' would apply instead of ''table[1]'', making these synonymous: {{luaself|:_out|args=4, nil, nil, nil, ' and ', {', '} }} and {{luaself|:_out|args=4, {', ', [4] = ' and '} }}. The number {{code|lang=lua|0}} is "magic" when passed as the first arg (even by itself), joining and appending to the same Buffer ''after'' it has been {{luaself|Buffer|:_cc|emptied|y}}. This is the only method by which a Buffer in [[#raw|raw mode]] may lose that status. Parent references are preserved.
Summary:
Please note that all contributions to IndicWiki Sandbox 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
My wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Toggle limited content width