Fonkili StrComp na VBScript
Tafiyar da kira da wasiillan shirin
Fonkili StrComp zaiya kara kwen kwen da kwallon birane, kuma zaiya cire wuri da nuna shafin bincike.
Fonkili StrComp zaiya zaiya cece:
- -1 (if string1 < string2)
- -1 (if string1 < string2)
- 0 (if string1 = string2)
- 1 (if string1 > string2)
Null (if string1 or string2 is Null)
Syntax
StrComp(string1,string2[,compare]) | Parameter |
---|---|
Description | string2 |
string1 | string2 |
Required. String expression. |
compare Optional. Specifies the string comparison to use. Default is 0
|
1 = vbTextCompare - Execute text comparison
Instance
Example 1
Output:
0
Example 2
document.write(StrComp("VBScript","vbscript"))
Output:
-1
Example 3
document.write(StrComp("VBScript","vbscript",1))
Output:
0