VBScript StrComp İşlevi
❮ Komple VBScript Referansı
StrComp işlevi, iki dizeyi karşılaştırır ve karşılaştırmanın sonucunu temsil eden bir değer döndürür.
StrComp işlevi aşağıdaki değerlerden birini döndürebilir:
- -1 (dize1 < dize2 ise)
- 0 (dize1 = dize2 ise)
- 1 (eğer string1 > string2 ise)
- Null (string1 veya string2 Null ise)
Sözdizimi
StrComp(string1,string2[,compare])
Parameter | Description |
---|---|
string1 | Required. A string expression |
string2 | Required. A string expression |
compare | Optional. Specifies the string comparison to use.
Default is 0 Can have one of the following values:
|
örnek 1
response.write(StrComp("VBScript","VBScript"))
Output:
0
Örnek 2
response.write(StrComp("VBScript","vbscript"))
Output:
-1
Örnek 3
response.write(StrComp("VBScript","vbscript",1))
Output:
0
❮ Komple VBScript Referansı