strCmp Function
Compares two text strings.
Note: 0 if the two strings are identical, 1 if the first string sorts earlier, or -1 if the second string sorts earlier.
Syntax:
int strCmp(str text1, str text2)
The comparison performed by this method is case-sensitive.
Example:
print strCmp("prash","prash");
pause;
Result : returns 0 if two strings are identical
print strCmp("prash","PRA");
pause;
Result : returns 1 if first string is executed first;
print strCmp("ddd","kkk");
pause;
Result : returns 1 if the second string executed first;
print strCmp("hhh","ooo");
pause;
Result : returns -1 if the second string executed first;
Compares two text strings.
Note: 0 if the two strings are identical, 1 if the first string sorts earlier, or -1 if the second string sorts earlier.
Syntax:
int strCmp(str text1, str text2)
The comparison performed by this method is case-sensitive.
Example:
print strCmp("prash","prash");
pause;
Result : returns 0 if two strings are identical
print strCmp("prash","PRA");
pause;
Result : returns 1 if first string is executed first;
print strCmp("ddd","kkk");
pause;
Result : returns 1 if the second string executed first;
print strCmp("hhh","ooo");
pause;
Result : returns -1 if the second string executed first;
No comments:
Post a Comment