Determines if the first string is greater than the second string, ignoring case
Syntax
IsGreaterThan = SRP_String("GTC", String1, String2)
Parameters
Parameter | Description |
---|---|
String1 | One of the two strings to be compared. (REQUIRED) |
String2 | The other string to be compared. (REQUIRED) |
Returns
Returns 1 if the String1 is greater than String2 or 0 if String1 is less than or equal to String2.
Remarks
Added in 2.2.6
The GTC service compares two variables as strings. When you use the BASIC+ equality operator, the variables' contents will be compared according to abstract value, which means "123.000" will be equal to "123" instead of greater than. The GTC service, on the other hand, always does a character by character comparison.
Example
Str1 = "27." Str2 = "27" // BASIC+ returns 0 IsGreaterThan = (Str1 _GTC Str2) // The GTC service returns 1 IsGreaterThan = SRP_String("GTC", Str1, Str2) // Case comparison returns 0 (str1 is equal to str2, not greater than) IsGreaterThan = SRP_String("GTC", "HELLO", "hello")