equals

From RPTools Wiki
Revision as of 21:04, 22 May 2020 by Phergus (talk | contribs) (Created page with "{{MacroFunction |name=equals |proposed=false |trusted=false |description= This functions checks for equality between all of the passed in values. You can use it for string (c...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

equals() Function

This functions checks for equality between all of the passed in values. You can use it for string (case-insensitive) or numeric comparisons but not both at the same time. Passing in a mix of strings and numbers will always return false.

Usage

equals(n1, n2, ...)
equals(s1, s2, ...)

Parameters

  • n1+ - Number
  • s1+ - String

Example

This example doesn't really do anything.
[r: equals(1, 1)]
[r: equals(1, 1, 0)]
[h: species = "duck"]
[r: equals(species, "Duck")]
[r: equals(species, "Chicken")]

Returns:

1
0
1
0

See Also