Content added Content deleted
(Created page with "{{documentation subpage}} {{Lua|Module:Yesno}} This module contains several helper functions for Module:InfoboxBuilder and Module:DatatableBuilder templates. == Functions == === stringToArray === <syntaxhighlight lang="lua"> ProcessingFunctions.stringToArray(delimiter) </syntaxhighlight> Pass in the delimiter to be used when splitting the string into tokens. When called, this will return a function that uses the first parameter as the input string to split....") |
mNo edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 20: | Line 20: | ||
When called, this function will turn a string into a bool if the string is equivalent to a true value or false value (see [[Module:Yesno]] for such values). If the string is neither true nor false, then returns nil. |
When called, this function will turn a string into a bool if the string is equivalent to a true value or false value (see [[Module:Yesno]] for such values). If the string is neither true nor false, then returns nil. |
||
=== stringToNumber === |
|||
<syntaxhighlight lang="lua"> |
|||
ProcessingFunctions.stringToNumber |
|||
</syntaxhighlight> |
|||
When called, this function will turn a string into a number or nil. |
Latest revision as of 15:48, 12 October 2023
This is a documentation subpage for Module:ProcessingFunctions. It contains usage information, categories and other content that is not part of the original module page. |
This module depends on the following other modules: |
This module contains several helper functions for Module:InfoboxBuilder and Module:DatatableBuilder templates.
Functions[edit source]
stringToArray[edit source]
ProcessingFunctions.stringToArray(delimiter)
Pass in the delimiter to be used when splitting the string into tokens. When called, this will return a function that uses the first parameter as the input string to split.
stringToBoolOrNil[edit source]
ProcessingFunctions.stringToBoolOrNil
When called, this function will turn a string into a bool if the string is equivalent to a true value or false value (see Module:Yesno for such values). If the string is neither true nor false, then returns nil.
stringToNumber[edit source]
ProcessingFunctions.stringToNumber
When called, this function will turn a string into a number or nil.