String Intrinsic Functions - Compare Method

Compare two strings

Member of String Intrinsic Functions (PRIM_LIBI.ICommonStringIntrinsics)

Parameters

NameTypeData TypeDescription
Result*Result (Optional)EnumerationResult of the comparison
To*InputStringValue to be compared
CompareKind*Input (Optional)EnumerationDetermines how the values are compared
IgnoreCase*Input (Optional)BooleanIgnore 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 ValueDescription
EqualThe values are the same
GreaterThe subject is greater than the target
LessThe 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

All Component Classes

Technical Reference

Febuary 18 V14SP2