Module:Params/doc: Difference between revisions

Content deleted Content added
mNo edit summary
Document {{#invoke:params|with_name_matching|...}} and similar functions
Line 176:
; Syntax
: <syntaxhighlight lang="wikitext" inline>{{#invoke:params|with_name_matching|pattern|pipe function name}}</syntaxhighlight>
 
Internally this modifier uses Lua's [[:mw:Extension:Scribunto/Lua reference manual#string.find|<code>string.find()</code>]] function to find whether parameter names match against a given pattern. For the pattern argument ({{para|1}}) please use the same syntax of [[:mw:Extension:Scribunto/Lua reference manual#Patterns|Lua patterns]].
 
Example:
Line 186 ⟶ 188:
; Syntax
: <syntaxhighlight lang="wikitext" inline>{{#invoke:params|with_name_not_matching|pattern|pipe function name}}</syntaxhighlight>
 
Internally this modifier uses Lua's [[:mw:Extension:Scribunto/Lua reference manual#string.find|<code>string.find()</code>]] function to find whether parameter names match against a given pattern. For the pattern argument ({{para|1}}) please use the same syntax of [[:mw:Extension:Scribunto/Lua reference manual#Patterns|Lua patterns]].
 
Example:
Line 196 ⟶ 200:
; Syntax
: <syntaxhighlight lang="wikitext" inline>{{#invoke:params|with_value_matching|pattern|pipe function name}}</syntaxhighlight>
 
Internally this modifier uses Lua's [[:mw:Extension:Scribunto/Lua reference manual#string.find|<code>string.find()</code>]] function to find whether parameter values match against a given pattern. For the pattern argument ({{para|1}}) please use the same syntax of [[:mw:Extension:Scribunto/Lua reference manual#Patterns|Lua patterns]].
 
Example:
Line 206 ⟶ 212:
; Syntax
: <syntaxhighlight lang="wikitext" inline>{{#invoke:params|with_value_not_matching|pattern|pipe function name}}</syntaxhighlight>
 
Internally this modifier uses Lua's [[:mw:Extension:Scribunto/Lua reference manual#string.find|<code>string.find()</code>]] function to find whether parameter values match against a given pattern. For the pattern argument ({{para|1}}) please use the same syntax of [[:mw:Extension:Scribunto/Lua reference manual#Patterns|Lua patterns]].
 
Example: