int stringCompare(string inA, string inB)
Description
Perform lexicographical comparison between two strings inA and inB, and returns an integer indicate the comparison (0 if inA = inB, 1 if inA > inB, -1 if inA < inB)
Parameters
The following is a list of parameters the functions receives
Parameter | Type | Description |
---|---|---|
inA | string | string to compare |
inB | string | string to compare |
Return Type
Int
Overloads
List of overloads for this function
Int stringCompare(string inA, string inB, bool inIgnoreCase)
Parameters for overloads:
Parameter | Type | Description |
---|---|---|
inA | string | string to compare |
inB | string | string to compare |
inIgnoreCase | bool | 'true' in order to ignore upper/lower case letters in comparison, of 'false' otherwise |
Example
stringCompare("Sunday","Monday") will return 1. stringCompare("Monday","Monday") will return 0. stringCompare("Monday", "Thursday") will return -1.
Comments
Please sign in to leave a comment.