equalsStrict: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{MacroFunction |name=equalsStrict |proposed=false |trusted=false |description= This function checks for equality between all of the passed in values. Unlike {{func|equals}}...") |
m (Text replacement - "<source" to "<syntaxhighlight") |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 7: | Line 7: | ||
|usage= | |usage= | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
equalsStrict(s1, s2, ...) | equalsStrict(s1, s2, ...) | ||
</ | </syntaxhighlight> | ||
'''Parameters''' | '''Parameters''' | ||
{{param|s1+|String}} | {{param|s1+|String}} | ||
|example= | |example= | ||
< | <syntaxhighlight lang="mtmacro" line> | ||
[h: species = "duck"] | [h: species = "duck"] | ||
[r: equalsStrict(species, "Duck")] | [r: equalsStrict(species, "Duck")] | ||
[r: equalsStrict(species, "duck")] | [r: equalsStrict(species, "duck")] | ||
[r: equalsStrict(species, "Chicken")] | [r: equalsStrict(species, "Chicken")] | ||
</ | </syntaxhighlight> | ||
'''Returns:''' | '''Returns:''' | ||
< | <syntaxhighlight lang="mtmacro"> | ||
0 | 0 | ||
1 | 1 | ||
0 | 0 | ||
</ | </syntaxhighlight> | ||
|also= | |also= | ||
Line 32: | Line 32: | ||
}} | }} | ||
[[Category:Macro Function]] | [[Category:Macro Function]] | ||
[[Category:Logical Function]] | |||
[[Category:String Function]] | [[Category:String Function]] |
Latest revision as of 18:24, 14 March 2023
equalsStrict() Function
This function checks for equality between all of the passed in values. Unlike equals() this function can only be used for string values and is case-sensitive.
Usage
equalsStrict(s1, s2, ...)
Parameters
s1+
- String
Example
[h: species = "duck"]
[r: equalsStrict(species, "Duck")]
[r: equalsStrict(species, "duck")]
[r: equalsStrict(species, "Chicken")]
Returns:
0
1
0