strequal()
Description
Compare two strings.
Syntax
strequal(string1[], string2[], ignorecase, length);
Parameters
Variable | Input |
|---|---|
| The first string in the comparison. |
| The second string in the comparison. |
| true - case is ignored during the comparison. false - case is matched during the comparison. |
| The maximum number of characters to consider for comparison in decimal number. |
Returns
true if the strings are equal, false if they are different.
Function call example
Example of string comparing
new array1[5]=''Same'';
new array2[6]=''Same'';
new array3[5]=''diff'';
new array4[15]=''diffSamediff'';
new value1;
new value2;
new value3;
main(){
value1 = strequal(array1,array2,false,4); // this will return 1
value2 = strequal(array1,array3,false,4); // this will return 0
value3 = strequal(array1,array4[4],false,4); // this will return 1
while(1){
Delay(1000); // Delay 1 sec.
}
}