Module:Multiformat/doc
Appearance
| This is a documentation subpage for Module:Multiformat. It may contain usage information, categories and other content that is not part of the original module page. |
| This module is rated as alpha. It is ready for limited use and third-party feedback. It may be used on a small number of pages, but should be monitored closely. Suggestions for new features or adjustments to input and output are welcome. |
| This module depends on the following other modules: |
| Description | Formats multiple numbered arguments and outputs them in order, etc. |
|---|---|
| Status | Alpha |
| Updated | June 5, 2026 (52 days 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'
| Sequence | Result |
|---|---|
\{
|
{
|
\}
|
}
|
\[
|
[
|
\]
|
]
|
\p
|
|
|
\e
|
=
|
\_
|
|
Documentation
Package items
multiformat._all( pargs, cargs )(function)- Main entrypoint for formatting output string with all parameters
- Parameters:
pargsThe arguments from the template call (table)cargsThe arguments from the module call (table)cargs.startAllthe beginning formatting string sequence (string)cargs.endAllthe ending formatting string sequence (string)cargs.formatthe format string (string)cargs.nowikiWhether the arguments are encased in nowiki tags (boolean)cargs.emptyThe message to give if no arguments are specified (string)
- Returns: Output to preprocess (string)
multiformat.all( frame )(function)- Template call
- Parameter:
framecalling 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:
pargsThe arguments from the template call (table)cargsThe arguments from the module call (table)cargs.startAllthe beginning formatting string sequence (string)cargs.endAllthe ending formatting string sequence (string)cargs.formatthe format string (string)cargs.nowikiWhether the arguments are encased in nowiki tags (boolean)cargs.emptyThe message to give if no arguments are specified (string)
- Returns: Output to preprocess (string)
multiformat.named( frame )(function)- Template call
- Parameter:
framecalling 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:
pargsThe arguments from the template call (table)cargsThe arguments from the module call (table)cargs.startAllthe beginning formatting string sequence (string)cargs.endAllthe ending formatting string sequence (string)cargs.formatthe format string (string)cargs.firstArgthe first numbered argument to begin formatting (number)cargs.prefixthe argument prefix (string)cargs.suffixthe argument suffix (string)cargs.nowikiWhether the arguments are encased in nowiki tags (boolean)cargs.emptyThe message to give if no arguments are specified (string)
- Returns: Output to preprocess (string)
multiformat.main( frame )(function)- Template call
- Parameter:
framecalling 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:
- Returns: Number of numbered parameters supplied (number)
multiformat.nArgs( frame )(function)- Template call
- Parameter:
framecalling frame (Frame) - Returns: Number of arguments passed (number)
- Usage:
{{#invoke:Multiformat|nArgs}}
Documentation above is auto generated