Checks whether two strings are equal.
equals(x:string, y:string, [ignore_case=bool]) -> boolDescription
Section titled “Description”The equals function returns true if x and y are equal and false
otherwise.
Set ignore_case=true to compare using full Unicode case folding instead of
case-sensitive matching.
x: string
Section titled “x: string”The left-hand string to compare.
y: string
Section titled “y: string”The right-hand string to compare.
ignore_case: bool (optional)
Section titled “ignore_case: bool (optional)”If true, compares strings using full Unicode case folding.
Defaults to false.
Examples
Section titled “Examples”Compare strings case-sensitively
Section titled “Compare strings case-sensitively”from { same: equals("abc", "abc"), different: equals("abc", "ABC"),}{ same: true, different: false,}Compare strings case-insensitively
Section titled “Compare strings case-insensitively”from { ascii: equals("Get", "GET", ignore_case=true), unicode: equals("STRASSE", "straße", ignore_case=true),}{ ascii: true, unicode: true,}