
Compare two strings
Member of Unicode Intrinsic Functions (PRIM_LIBI.IUnicodeIntrinsics)
Parameters
Name | Type | Data Type | Description |
---|---|---|---|
Result | *Result (Optional) | Enumeration | Result of the comparison |
To | *Input | Unicode String | Value to be compared |
CompareKind | *Input (Optional) | Enumeration | Determines how the values are compared |
IgnoreCase | *Input (Optional) | Boolean | Ignore case when comparing the values |
Details
Compare two values to determine whether they are equivalent or different. This is useful for inbuilt sorting mechanisms as found in controls such as Tree and Tile where the sequence of data is defined by the user. Possible results are as follows
Enum Value | Description |
---|---|
Equal | The values are the same |
Greater | The subject is greater than the target |
Less | The target is greater than the subject |
Example
Using the Compare intrinsic is the equivalent of writing the following
If (#Subject > #Object) #Result := Greater Else If (#Subject < #Object) #Result := Less Else #Result := Equal Endif Endif
See also
LANSA Version 15, April 2020