Template talk:Str find word
Appearance
(Redirected from Template talk:Str find word/sandbox/doc)
todo
[edit]- .. –Mar 2023 notes
- word order in return string
- resove synonyms eg
|_monday=Monday, Mon, monday
- Note 1. The True return value is a list of all words found
- T:
{{Str find word |source=alpha, beta, gamma, foo, bar |andwords=alpha, foo}}
(True
) → alpha,foo- return-text: add space after comma ⟨, ⟩.
- later
- Note 2. Parameter
|word=
is equal to|andwords=
|andwords=alpha, foo
- T:
{{Str find word |source=alpha, beta, gamma, foo, bar |andwords=alpha, foo}}
(True
) → alpha,foo
|orwords=
wordlist with OR-check- The wordlist
|orwords=
requires that at least one word of the list is found. - T:
{{Str find word |source=alpha, beta, gamma, foo, bar |orwords=nov, drop, foo}}
(True
) → foo- Here too, all found words are returned in the True-value
- T:
{{Str find word |source=alpha, beta, gamma, foo, bar |orwords=gamma, nov, drop, foo}}
(True
) → gamma,foo
- Checking AND-wordlists, OR-wordlists
|andwords=
and|orwords=
can be used together.- Words in the AND-list must all be present, the OR-list requires one or more words to be found.
- When True, all hitwords are returned (once).
- T:
{{Str find word |source=alpha, beta, gamma, foo, bar |andwords=foo, bar |orwords=gamma, nov, drop}}
(True
) → foo,bar,gamma
- option "count hits"
- (unique, no aka's)
- handle blanks
- in {str find word|source={format|}|orwords=default, monotype, foo, <blank>} - detect & separate blank
- option notwords
notwords
-- reversed logic? what to output?
- multiple AND-lists
- "AND-1=(workday, 0700) OR AND-2=(weekend, 0900)"
- basically works by adding twice: {IF:{sfw|andw|workday, 0700}{sfw|andw=weekend, 0900}|THEN...|ELSE}
27 February 2023 (UTC)
- 'which words are in the input'
- return first hit
- → feed a #switch.