Syntax
Public Function StringSubstr(stringVar As String, startPos As Integer, Optional Strlengh As Integer = -1) As String
Description
This function is used to return a substring from a text starting from the specific position.
Parameters
Key | Description |
stringVar | String value to get substring from it. |
startPos | Start position to get a substring,value of type Integer. |
Strlengh | length of an extracted substring. If parameter value is -1 this mean the sub string will extract from the specific position to the string end. |
Return value
Returns a sub string.
Sample
Public Sub main() Dim x x ="3457" AlertMessage StringSubstr(CSTR(x),Cint(2)) 'Alert Message will return 457 End Sub
See Also