Content deleted Content added
No edit summary |
No edit summary |
||
Line 8:
:True: <code><nowiki>{{#invoke:Str find word|main |source=foo, bar|word=bar}}</nowiki></code> → {{#invoke:Str find word|main |source=foo, bar|word=bar}} ({{code|True}})
:False: <code><nowiki>{{#invoke:Str find word|main |source=alpha, beta, gamma|word=november}}</nowiki></code> → {{#invoke:Str find word|main |source=alpha, beta, gamma|word=november}} ({{code|False}})
Complete words: the complete word is '{{mono|1=foobar}}' ... example needed ...▼
''Multiple word check'': The search can be extended to check for multiple words being present.
Line 20 ⟶ 18:
:True: <code><nowiki>{{#invoke:Str find word|main |source=alpha, beta, gamma|orwords=beta, alpha}}</nowiki></code> → >{{#invoke:Str find word|main |source=alpha, beta, gamma|orwords=beta, alpha}}<
:False: <code><nowiki>{{#invoke:Str find word|main |source=alpha, beta, gamma|orwords=beta, omega}}</nowiki></code> → >{{#invoke:Str find word|main |source=alpha, beta, gamma|orwords=beta, omega}}<
Whitespace is trimmed,
The module is aimed at template code usage. <small>(The editor does not have to apply Lua patterns like {{code|1=[%a%d]*}})</small>.
|