Syntax
Public Function LeftString(varString As String, lengthVal As Integer) As String
Description
This function is used to return a string containing a specified number of characters from the left side of a string.
Parameters
Key | Description |
varString | String expression from which leftmost are returned |
lengthVal | Numeric expression indicating how many characters to return,value of type Integer |
Return value
Returns a left side of string.
Exceptions
Error number | Condition |
5 | lengthVar <0 |
Sample
Public Sub main()Dim Str Dim Result str= "VertexFX"Result = LeftString(str,3)AlertMessage(Result)' it will return VerEnd Sub
See Also