Open main menu
Home
Random
Donate
Recent changes
Special pages
Community portal
Preferences
About Stockhub
Disclaimers
Search
User menu
Talk
Contributions
Create account
Log in
Editing
Module:Str find word/doc
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===AND-, OR-wordlist checks=== :{{para|word}} as noted, can be a ''list of words''. All will be checked with the ''AND''-requirement (each word must be present). :{{para|andwords}} accepts a ''list of words'' that all will be checked with the ''AND''-requirement (each word must be present). ::When both {{para|word}}, {{para|andwords}} are present, they are combined into one single ''AND''-wordlist. :{{para|orwords}} accepts a ''list of words'' that all will be checked with the ''OR''-requirement (at least one of the words must be present). {| class="wikitable" style="" |- ! {{para|1=source}}<br/>{{para|1=s}} ! {{para|1=andwords}}, {{para|1=andw}}<br/>{{para|1=word}}<br/>{{para|1=w}} ! {{para|1=orwords}}<br/>{{para|1=orw}} ! result TODO fix ! note |- | {{para|1=s|2=alpha, foo, lima, delta}} | {{para|andw|delta, lima}} | | {{#invoke:Str find word|main |explain=true |s=alpha, foo, lima, delta|andw=delta, lima}} | both words present in the source |- | {{para|1=s|2=alpha, foo, lima, delta}} | {{para|andw|foo, nov}} | | {{#invoke:Str find word|main |explain=true |s=alpha, foo, lima, delta}} | AND-logic: A word in the ''AND''-list is not present ({{mono|nov}}), so false |- | {{para|1=s|2=alpha, foo, lima, delta}} | {{para|andw|delta}} | | {{#invoke:Str find word|main |explain=true |s=alpha, foo, lima, delta|andw=delta}} | {{para|w}} and {{para|andw}} are combined |- | {{para|1=s|2=alpha, foo, lima, delta}} | | {{para|orw|delta, lima}} | {{#invoke:Str find word|main |explain=true |s=alpha, foo, lima, delta|orw=delta, lima}} | both OR-words are present in the source |- | {{para|1=s|2=alpha, foo, lima, delta}} | | | {{#invoke:Str find word|main |explain=true |s=alpha, foo, lima, delta|orw=foo, nov}} | OR-logic: one of the words is present ({{para|foo}}), so true |- | {{para|1=s|2=alpha, foo, lima, delta}} | {{para|andw|alpha, lima}} | {{para|orw|foo, nov}} | {{#invoke:Str find word|main |explain=true |s=alpha, foo, lima, delta|andw=alpha, lima|orw=foo, nov}} | |- | {{para|1=s|2=alpha, foo, lima, delta}} | {{para|andw|bar, april}} | {{para|orw|nov, dec}} | {{#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 |}
Summary:
Please note that all contributions to Stockhub may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Stockhub:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)