Returns the result of comparing two strings.
| Category: | String |
| Returned data type: | Integer |
specifies a string to be used in the comparison; this can be specified as string constant, field name, or expression.
specifies a string to be used in the comparison; this can be specified as string constant, field name, or expression.
specifies a Boolean string that indicates whether to compare case-insensitive strings; this can be specified as string constant, field name, or expression.
| TRUE | specifies that the string comparison is not case sensitive. |
| FALSE | specifies that the comparison is case sensitive. |
| Default | FALSE |
[-1 = string1 < string 2, 0 = string1 equals string2, 1 = string1 > string2]
if string1 == string2 then match=true
// hallo comes before hello when alphabetically sorted
rc = compare("hello", "hallo" ) // outputs 1
// Hello comes before hello when alphabetically sorted
rc = compare("Hello", "hello" ) // outputs -1
modifier = null
rc = compare("Hello", "hello", modifier ) // outputs -1
rc = compare("Hello", "hello", true ) // outputs 0