Content deleted Content added
No edit summary |
|||
Line 26:
:{{red|This documentation is not up to date}}. See template {{tl|Str find word}}.
==
<pre>▼
{{Str find word▼
|source =▼
|word =▼
}}▼
</pre>▼
:When the ''word'' is found in the ''source'' (True), the function returns the ''word'' itself (by default), or {{para|yes}} value (when entered non-empty).▼
:When not found (False), the function returns a empty string ({{code|''}}), or the {{para|no}} value when entered.▼
{| class="wikitable"▼
|-▼
| {{para|1=source|2=alpha, foo, lima}}▼
| {{para|word|foo}}▼
| {{#invoke:Str find word|main |explain=true |source=alpha, foo, lima|word=foo}}▼
| {{aye}}▼
| ▼
|-▼
| {{para|1=source|2=alpha, foo, lima}}▼
| {{para|word|foobar}}▼
| {{#invoke:Str find word|main |explain=true |source=alpha, foo, lima|word=foo-bar|yes=Yes, hit|no=No, not found}}▼
| {{nay}}▼
| full word ''foo-bar'' not in the source▼
|-▼
| {{para|1=source|2=alpha, foo, lima}}▼
| {{para|word|foobar}}▼
| {{#invoke:Str find word|main |explain=true |source=alpha, foo-bar, lima|word=foo|yes=Yes, hit|no=No, not found}}▼
| {{nay}}▼
| word ''foo'' not in the source as full word▼
|}▼
▲===All parameters===
{|
|-
Line 102 ⟶ 69:
<pre>{{Str find word |s= |w= |andw= |orw= |case= |yes= |no= |explain=}}</pre>
===
▲<pre>
▲{{Str find word
▲|source =
▲|word =
▲}}
▲</pre>
▲:When the ''word'' is found in the ''source'' (True), the function returns the ''word'' itself (by default), or {{para|yes}} value (when entered non-empty).
▲:When not found (False), the function returns a empty string ({{code|''}}), or the {{para|no}} value when entered.
▲{| class="wikitable"
▲|-
▲| {{para|1=source|2=alpha, foo, lima}}
▲| {{para|word|foo}}
▲| {{#invoke:Str find word|main |explain=true |source=alpha, foo, lima|word=foo}}
▲| {{aye}}
▲|
▲|-
▲| {{para|1=source|2=alpha, foo, lima}}
▲| {{para|word|foobar}}
▲| {{#invoke:Str find word|main |explain=true |source=alpha, foo, lima|word=foo-bar|yes=Yes, hit|no=No, not found}}
▲| {{nay}}
▲| full word ''foo-bar'' not in the source
▲|-
▲| {{para|1=source|2=alpha, foo, lima}}
▲| {{para|word|foobar}}
▲| {{#invoke:Str find word|main |explain=true |source=alpha, foo-bar, lima|word=foo|yes=Yes, hit|no=No, not found}}
▲| {{nay}}
▲| word ''foo'' not in the source as full word
▲|}
===Case, Literal, ===
: todo: examplify
{| class="wikitable" style=""
|-
Line 203 ⟶ 202:
===True, False rephrase options {{para|yes, no}}===
{| class="wikitable"
|-
|