Compares two strings.
The function starts comparing the first character of each string. If they are equal to each other, it continues with the following pairs until the characters differ or until the end of shorter string is reached.
- string1: first input string for comparison.
- string2: second input string for comparison.
Returns an integral value indicating the relationship between the strings:
- <0 - the first character that does not match has a lower value in string1 than in string2
- 0 - the contents of both strings are equal
- >0 - the first character that does not match has a greater value in string1 than in string2
datatable(string1:string, string2:string) ["ABC","ABC", "abc","ABC", "ABC","abc", "abcde","abc"] | extend result = strcmp(string1,string2)