Promotic
WikipediaLinkedInYoutubeTwitterFacebook

StringCmp - method of object Pm

Description:
Returns a result of a comparison of the two strings.
Syntax:
StringCmp(sString1 As String, sString2 As String, [sParams As String]) As Long
Calling:
nRes = Pm.StringCmp(sString1, sString2, sParams)
Parameters:
sString1(String) First string to be compared.
sString2(String) Second string to be compared.
sParams[optional] (String) Entries with assigned value are separated by a semicolon, for example mode:begin;ic:0;
mode:s;
mode:full; (default) - The two strings are compared for equality. If the strings lenght is different, these cannot be equal.
mode:begin; - The beginning portion of the first string is compared with the whole second string. I.e. whether the sString1 begins with the sString2.
ic:n; - (IgnoreCase)
ic:0; (default) - The string comparation will work as Case Sensitive.
ic:1; - The string comparation will work as Case Insensitive.
Return Values:
0 - sString1 is not equal to sString2
1 - sString1 is equal to sString2
Note:
The method can also be called in the graphic item events for Web Panels.

The method is functional also in Macro expression $.expr.

Example:
nRes = Pm.StringCmp("Windows 7", "Windows 7")  ' nRes contains 1
nRes = Pm.StringCmp("Windows 7", "Windows")  ' nRes contains 0
nRes = Pm.StringCmp("Windows 7", "Windows", "mode:begin;")  ' nRes contains 1
nRes = Pm.StringCmp("WINDOWS 7", "Windows", "mode:begin;")  ' nRes contains 0
nRes = Pm.StringCmp("WINDOWS 7", "Windows", "mode:begin;ic:1;")  ' nRes contains 1
Navigation:
 
- Pm
 
- Abs
- Cos
- E
- Exp
- LN2
- PI
- Pow
- Sin
- StringCmp
 
 
- Tan
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice