Update cookies preferences
Promotic

StringSub - method of the Pm object

Description:
Returns the substring of another string.
Syntax:
String StringSub(String sString, Long nStart, [Long nEnd])
Parameters:
sString(String) Source string expression.
nStart(Long) Index in the string where the requested substring is to start.
0 = from beginning of the string.
If this parameter is negative, then it specifies the position from the end of the string. It means that the number -1 indicates the last character, -2 the one before last character, etc.
nEnd[optional] (Long) Index in the string that follows right after the substring ends.
If not set, then the substring will contain all characters up to the end of the string.
If the parameter is negative, then the characters are counted from the end of the string.
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 sSub = Pm.StringSub("x100abc", 1, 4);   // sSub contains "100"

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

Send page remarkContact responsible person
Navigation:
 
- Pm
 
- Abs
- Cos
- E
- Exp
- LN2
- PI
- Pow
- Sin
- StringSub
 
 
- Tan
© MICROSYS, spol. s r.o.