Module:Str find word/doc: Difference between revisions

Content deleted Content added
No edit summary
Line 97:
| {{nay}}
| word ''foobar'' not in the source as full word
|}
 
===Case ===
{| class="wikitable" style=""
|-
! {{para|1=source}}<br/> {{para|1=s}}
! {{para|1=word}}<br/>{{para|1=w}}
! {{para|1=case}}
! result
! note
|-
| {{para|1=s|2=alpha, foo, lima}}
| {{para|w|foo}}
| &rarr; {{#invoke:Str find word|main |explain=true |s=alpha, foo, lima|w=foo|yes=yes|no=no}}
|
|-
| {{para|1=s|2=alpha, foo, lima}}
| {{para|w|foobar}}
| &rarr; {{#invoke:Str find word|main |explain=true |source=alpha, foo, lima|word=foobar|yes=yes|no=no}}
|
|-
| {{para|1=s|2=alpha, foobar, lima}}
| {{para|w|foo}}
| &rarr; {{#invoke:Str find word|main |explain=true |source=alpha, foobar, lima|word=foo|yes=yes|no=no}}
| 'foo' is not the complete word
|-
| {{para|1=s|2=alpha, FOO, lima}}
| {{para|w|foo}}
| &rarr; {{#invoke:Str find word|main |explain=true |source=alpha, FOO, lima|word=foo|yes=yes|no=no|case=false}}
| {{para|case|false}}: a=A ''(default)''
|-
| {{para|1=s|2=alpha, FOO, lima}}
| {{para|w|foo}}
| &rarr; {{#invoke:Str find word|main |explain=true |source=alpha, FOO, lima|word=foo|yes=yes|no=no|case=true}}
| {{para|case|true}}: a=/=A
|}
 
Line 195 ⟶ 155:
| {{#invoke:Str find word|main |explain=true |s=alpha, foo, lima, delta|andw=delta|orw=nov, dec}}
| none of the OR-words is present, so false
|}
 
===Case ===
{| class="wikitable" style=""
|-
! {{para|1=source}}<br/> {{para|1=s}}
! {{para|1=word}}<br/>{{para|1=w}}
! {{para|1=case}}
! result
! note
|-
| {{para|1=s|2=alpha, foo, lima}}
| {{para|w|foo}}
| &rarr; {{#invoke:Str find word|main |explain=true |s=alpha, foo, lima|w=foo|yes=yes|no=no}}
|
|-
| {{para|1=s|2=alpha, foo, lima}}
| {{para|w|foobar}}
| &rarr; {{#invoke:Str find word|main |explain=true |source=alpha, foo, lima|word=foobar|yes=yes|no=no}}
|
|-
| {{para|1=s|2=alpha, foobar, lima}}
| {{para|w|foo}}
| &rarr; {{#invoke:Str find word|main |explain=true |source=alpha, foobar, lima|word=foo|yes=yes|no=no}}
| 'foo' is not the complete word
|-
| {{para|1=s|2=alpha, FOO, lima}}
| {{para|w|foo}}
| &rarr; {{#invoke:Str find word|main |explain=true |source=alpha, FOO, lima|word=foo|yes=yes|no=no|case=false}}
| {{para|case|false}}: a=A ''(default)''
|-
| {{para|1=s|2=alpha, FOO, lima}}
| {{para|w|foo}}
| &rarr; {{#invoke:Str find word|main |explain=true |source=alpha, FOO, lima|word=foo|yes=yes|no=no|case=true}}
| {{para|case|true}}: a=/=A
|}
 
Line 212:
| {{nay}}
|}
 
 
===Edge cases: (blank input,) ===