STRSAME Function
Determines whether strings are the same. It returns TRUE if they are the same and FALSE if they aren't.
Syntax
STRSAME (" string1 ", " string2 ", ignoreCase )
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
string1 |
Required |
String |
The first string to compare. |
string2 |
Required |
String |
The second string to compare. |
ignoreCase |
Optional |
Boolean |
TRUE to ignore the case and FALSE to compare the case. The default is FALSE. |
Return value
Boolean
Remarks
To compare multi-byte strings or to do comparisons using case rules for a specific locale, use the STRSAMEEX function.
Example 1
STRSAME("cat","dog")
Returns FALSE.
Example 2
STRSAME("cat","cat")
Returns TRUE.
Example 3
STRSAME("cat","cat", TRUE)
Returns TRUE.
Example 4
STRSAME("cat","CAT")
Returns FALSE.
Example 5
STRSAME("cat","CAT", TRUE)
Returns TRUE.
Example 6
STRSAME("cät,"CAT", TRUE)
Returns FALSE.
Example 7
STRSAME("cät,"CÄT", TRUE)
Returns TRUE.