Share via


Comparer.Equals

Syntax

Comparer.Equals(comparer as function, x as any, y as any) as logical

About

Returns a logical value based on the equality check over the two given values, x and y, using the provided comparer.

comparer is a Comparer which is used to control the comparison. A comparer is a function that accepts two arguments and returns -1, 0, or 1 based on whether the first value is less than, equal to, or greater than the second. Comparers can be used to provide case-insensitive or culture and locale-aware comparisons.

The following built-in comparers are available in the formula language:

Example 1

Compare "1" and "A" using "en-US" locale to determine if the values are equal.

Usage

Comparer.Equals(Comparer.FromCulture("en-US"), "1", "A")

Output

false