Rexx - left String



This method returns a certain number of characters from the left of the string.

Syntax

left(str,count) 

Parameters

  • str − The source string.

  • count − The number of characters to return from the left of the string.

Return Value

This method returns a certain number of characters from the left of the string.

Example

/* Main program */ 
a = "Hello World" 
say left(a,5) 

When we run the above program, we will get the following result.

Output

Hello 
rexx_strings.htm
Advertisements