Module:Multiformat/doc

Formats multiple numbered arguments and outputs them in order, etc.

Module:Multiformat/doc
Multiformat
DescriptionFormats multiple numbered arguments and outputs them in order, etc.
Status
Alpha
UpdatedJune 5, 2026 (2 months ago)
Dependencies

Formats multiple numbered arguments and outputs them in order, etc.

This module allows for formatting of multiple numbered arguments together in an output string.

Syntax:

  • Many typical Lua character sequences (i.e. \n) will insert the relevant character into the output.
  • %ARG% is the argument value
  • %ARGNUM% is the argument number'
Custom escape sequences
Sequence Result
\{ {
\} }
\[ [
\] ]
\p |
\e =
\_

Documentation

Package items

multiformat._all( pargs, cargs ) (function)
Main entrypoint for formatting output string with all parameters
Parameters:
pargs The arguments from the template call (table)
cargs The arguments from the module call (table)
cargs.startAll the beginning formatting string sequence (string)
cargs.endAll the ending formatting string sequence (string)
cargs.format the format string (string)
cargs.nowiki Whether the arguments are encased in nowiki tags (boolean)
cargs.empty The message to give if no arguments are specified (string)
Returns: Output to preprocess (string)
multiformat.all( frame ) (function)
Template call
Parameter: frame calling frame (Frame)
Returns: Output wikitext (string)
Usage: {{#invoke:Multiformat|all|startAll=start|endAll=end|format=String with %ARG% to replace with current arguments and %ARGNAME% to replace with name of argument}}
multiformat._named( pargs, cargs ) (function)
Main entrypoint for formatting output string with named parameters only
Parameters:
pargs The arguments from the template call (table)
cargs The arguments from the module call (table)
cargs.startAll the beginning formatting string sequence (string)
cargs.endAll the ending formatting string sequence (string)
cargs.format the format string (string)
cargs.nowiki Whether the arguments are encased in nowiki tags (boolean)
cargs.empty The message to give if no arguments are specified (string)
Returns: Output to preprocess (string)
multiformat.named( frame ) (function)
Template call
Parameter: frame calling frame (Frame)
Returns: Output wikitext (string)
Usage: {{#invoke:Multiformat|named|startAll=start|endAll=end|format=String with %ARG% to replace with current arguments and %ARGNAME% to replace with name of argument}}
multiformat._main( pargs, cargs ) (function)
Main entrypoint for formatting output string
Parameters:
pargs The arguments from the template call (table)
cargs The arguments from the module call (table)
cargs.startAll the beginning formatting string sequence (string)
cargs.endAll the ending formatting string sequence (string)
cargs.format the format string (string)
cargs.firstArg the first numbered argument to begin formatting (number)
cargs.prefix the argument prefix (string)
cargs.suffix the argument suffix (string)
cargs.nowiki Whether the arguments are encased in nowiki tags (boolean)
cargs.empty The message to give if no arguments are specified (string)
Returns: Output to preprocess (string)
multiformat.main( frame ) (function)
Template call
Parameter: frame calling frame (Frame)
Returns: Output wikitext (string)
Usage: {{#invoke:Multiformat|main|startAll=start|endAll=end|format=String with %ARG% to replace with current arguments|firstArg=number of first arg}}
multiformat._nArgs( pargs, cargs ) (function)
Counts the number of arguments which match a particular format
Parameters:
pargs The arguments from the template call (table)
cargs The arguments from the module call (table)
cargs.firstArg the first numbered argument to begin formatting (number)
cargs.prefix the argument prefix (string)
cargs.suffix the argument suffix (string)
cargs.nowiki Whether the arguments are encased in nowiki tags (boolean)
Returns: Number of numbered parameters supplied (number)
multiformat.nArgs( frame ) (function)
Template call
Parameter: frame calling frame (Frame)
Returns: Number of arguments passed (number)
Usage: {{#invoke:Multiformat|nArgs}}

Documentation above is auto generated

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.