LEFT

Concept Link IconSee also

Return a number of characters from the beginning (left hand end) of a string.

WebVue support - Yes.

Syntax

StrVal = LEFT(Input, N);

Return type: STR.

Argument

Meaning

Input

The string to be manipulated. Type STR.

N

The number of characters to return. Any numeric type.

Execution

If N is greater than the length of the string then the entire string is returned.

Example

SUB Main()

DIM strResult as Str;

DIM strString as Str;

 

strString = "Hello, World!";

strResult = LEFT( strString ,5); 'takes the first 5 characters

PRINT("Result is: ", strResult );

'Displays "Result is: Hello"

END SUB