Template:Boolandnot

From AnthroWiki
Revision as of 13:18, 2 June 2022 by Odyssee (talk | contribs) (Created page with "<onlyinclude><includeonly>{{#if: {{{1|}}} | {{#if: {{{2|}}} | | 1 }} }}</includeonly></onlyinclude> {{Documentation}}")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

<templatestyles src="Module:Documentation/styles.css"></templatestyles>

Template documentation[view] [edit] [history] [purge]

This template is used to logically link two strings.

The template generates a non-empty string (i.e. returns "true") if the first parameter is non-empty and the second is empty.

Copy template

Parameters

Two strings.

Truth table

Truth table
Input Output
{{boolandnot| | }}
{{boolandnot| |1}}
{{boolandnot|1| }} 1
{{boolandnot|1|1}}

Examples

  • {{#if: {{Boolandnot| | }}| yes | no}} gives

no

  • {{#if: {{Boolandnot|xxx| }}| yes | no}} gives

yes

  • {{#if: {{Boolandnot| |xxx}}| yes | no}} gives

no

  • {{#if: {{Boolandnot|xxx|xxx}}| yes | no}} gives

no