created: 20150117152607000 modified: 20240229132501000 tags: $:/tags/Macro code-body: yes title: $:/editions/tw5.com/operator-macros \whitespace trim \procedure .operator-examples(op,text:"Examples") <$link to=`$(op)$ Operator (Examples)`><> \procedure .operator-example-tryit-actions() <$action-setfield $tiddler=<<.state>> text="show" filter=<>/> \procedure .operator-example(n,eg,ie)
<$list filter="[title<.state-prefix>addsuffix{!!title}addsuffix[/]addsuffix]" variable=".state"> <$reveal state=<<.state>> type="nomatch" text="show"> <$text text=<>/> <% if [!is[blank]] %>
→ <>
<% endif %>
<$button actions=<<.operator-example-tryit-actions>>>Try it
<$reveal state=<<.state>> type="match" text="show"> <$edit-text tiddler=<<.state>> field="filter" tag="input" type=search focus="true"/>
<$button set=<<.state>> setTo="">Hide <$reveal stateTitle=<<.state>> stateField="filter" type="nomatch" text=<>> <$button actions=<<.operator-example-tryit-actions>>>Reset
    <$list filter={{{[<.state>get[filter]]}}} emptyMessage="(empty)">
  • <$link><$view field="title"/>
\end \procedure .inline-operator-example(eg) <$text text=<>/> evaluates to <$list filter=<> emptyMessage="(empty)"> <$text text=<>/> \end \define .this-is-operator-example() This example tiddler is used to illustrate some of the [[Filter Operators]]. \define .using-days-of-week() These examples make use of the [[Days of the Week]] tiddler. \define .s-matching-is-case-sensitive() In looking for matches for <<.place S>>, capital and lowercase letters are treated as different. \procedure .node-only-operator() <$macrocall $name=".note" _="This operator is <<.em not>> available when ~TiddlyWiki is running in a web browser."/> \end