StringCmp - method of the Pm object

Returns a result of a comparison of the two strings.
Long StringCmp(String sString1, String sString2, [String sParams])
sString1(String) First string to be compared.
sString2(String) Second string to be compared.
sParams[optional] (String) Additional parameters comparation. Entries are in the KeyVal format, for example mode:begin;ic:0;
mode:full; (default) - The two strings are compared for equality. If the strings length is different, then these cannot be equal.
mode:begin; - The beginning portion of the first string is compared with the whole second string. It means that the sString1 begins with the sString2.
ic:n; - (IgnoreCase)
ic:0; (default) - case sensitive text
ic:1; - case insensitive text
Return values:
0 - sString1 is not equal to sString2
1 - sString1 is equal to sString2
This method is functional also in Macro expression $.expr and in the onDraw event of the PmgCanvas object.
This method is also functional in Web panels.
JavaScriptVBScriptSelect and copy to clipboard

var nRes = Pm.StringCmp("Windows 10", "Windows 10");   // nRes contains 1
nRes = Pm.StringCmp("Windows 10", "Windows");   // nRes contains 0
nRes = Pm.StringCmp("Windows 10", "Windows", "mode:begin;");   // nRes contains 1
nRes = Pm.StringCmp("WINDOWS 10", "Windows", "mode:begin;");   // nRes contains 0
nRes = Pm.StringCmp("WINDOWS 10", "Windows", "mode:begin;ic:1;");   // nRes contains 1

Pm8.02.06: Created
PROMOTIC 9.0.17 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
- 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