Promotic

StringFind - method of the Pm object

Description:
Returns the position of the first character of the searched text in the string
Syntax:
Long StringFind(String sValue, String sSearch, Long nStart)
Parameters:
sValue(String) Source string expression.
sSearch(String) Searched string
nStart(Long) The position of character in searched string efining the start of the search
Return values:
-1 - the string was not found
n - the position number of found string (zero-based index)
Note:
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.
Example:
JavaScriptVBScriptSelect and copy to clipboard

var sVal = "PROMOTIC is fun!";
var nRes = Pm.StringFind(sVal, "is", 0);   // nRes contains 9

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

Send page remarkContact responsible person
Navigation:
 
- Pm
 
- Abs
- Cos
- E
- Exp
- LN2
- PI
- Pow
- Sin
- StringFind
 
 
- Tan
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice