Promotic
WikipediaLinkedInYoutubeTwitterFacebook

StringSub - method of object Pm

Description:
Returns the substring of another string
Syntax:
StringSub(sString As String, nStart As Long, [nEnd As Long]) As String
Calling:
sString2 = Pm.StringSub(sString, nStart[, nEnd])
Parameters:
sString(String) Source string expression.
nStart(Long) Index in the string where the requested substring is to start. If this argument is negative then it defines the position from the end of the string. I.e. the number -1 indicates the last character, -2 the one before last, etc.
nEnd[optional] (Long) Index in the string that follows right after the substring ends. If this argument is not set then the substring contains all characters up to the end of the string. If the argument is negative then the cgaracters are counted from the end of the string.
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:
Dim sSub
sSub = Pm.StringSub("x100abc", 1, 4)
  ' sSub contains "100"
Navigation:
 
- Pm
 
- Abs
- Cos
- E
- Exp
- LN2
- PI
- Pow
- Sin
- StringSub
 
 
- Tan
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice