From Wikifunctions


This is a guided list of example Functions provided. See also the complete list of functions and Wikifunctions:Suggest a function.

Logic operators

These are the fundamental tools to control flow in your functions.

  • If (Z802): depending on whether the condition is true will return one or the other value

Basic Boolean operations

These are the basic blocks from which to build logic states.

Boolean pairwise functions

2 nullary Boolean functions
# Name ZID Value
1 nullary false nullary false (Z10206) F
2 nullary true nullary true (Z10210) T
4 unary Boolean functions
# Name ZID F T
1 unary false unary false (Z10214) F F
2 identity identity (Z10215) F T
3 not not (Z10216) T F
4 unary true unary true (Z10217) T T
16 binary Boolean functions
# Name ZID F#F F#T T#F T#T
1 binary false binary false (Z10257) F F F F
2 and and (Z10174) F F F T
3 not (A->B) not boolean implication (Z10962) F F T F
4 A Boolean Left (Z10265) F F T T
5 not (B->A) not backwards Boolean implication (Z10964) F T F F
6 B Boolean Right (Z10298) F T F T
7 xor Boolean inequality (Z10237) F T T F
8 or or (Z10184) F T T T
9 nor nor (Z10231) T F F F
10 xnor/eqv Boolean equality (Z844) T F F T
11 not B Boolean Not Right (Z10306) T F T F
12 B->A backwards Boolean implication (Z10348) T F T T
13 not A Boolean Not Left (Z10272) T T F F
14 A->B Boolean implication (Z10329) T T F T
15 nand nand (Z10243) T T T F
16 binary true Binary True (Z10287) T T T T

String operations

String evaluation operations

These functions perform simple tests on a text string to tell you if something else needs to be done, or they already are in an expected format.

Simple String transformations

These perform character replacements and other basic operations.

Uncommon String operations

These functions perform more advanced transformations, hold more states and showcase the more advanced capabilities of Wikifunctions.

String classical cipher functions

(alphabet needs to be specified when calling these functions)

Cryptographic hash functions

(would be better with types representing a stream of bytes)

Experimental String operations

TODO: Explain why these exist and when people might use them.

Natural language String operations

Esperanto String operations

Japanese String operations

Finnish String operations

English string operations

  • English plural (Z11089): Return the plural of an English word. See for context.

Wikitext string operations

  • csv record to wikitable row (Z10919): Converts a validly formatted (RFC 4180) comma-separated value series into the contents of a valid wikitable row (not including the row start or row end characters) where variables are separated by '||', and any whitespace is unchanged. Be careful to validly render CSV with quoted fields and with pipes ('|') in the field.
  • wrap with XML tag (Z11156): adds <tag> and </tag> around a string

Comma-separated operations

  • string is element of CSV (Z11094): Test whether a string is an element of a validly formatted (RFC 4180) comma-separated value series (single row, not whole file). Be careful to validly interpret a CSV with quoted fields.

Number operations


Date operations

  • is leap year (Gregorian calendar) (Z10996): Returns True if the specified year in the Gregorian calendar (the one currently used in most parts of the world) has 366 days (February 29th added), and False if the year has 365 days
  • is leap year (Julian calendar) (Z11015): Returns True if the specified year in the Julian calendar has 366 days, and False if the year has 365 days
  • is leap year (Jalali calendar) (Z11011): Returns True if the specified year in the Jalali calendar (one of the calendars still in use in Iran and Afghanistan, also called Persian calendar) has 366 days, and False if the year has 365 days

See also