String handling in REXX program.

String handling in REXX.

In REXX programs, we can handle the string using inbuilt functions

1) LENGTH - It gives the length of given string.
Sample Program -

/*REXX*/
A = 'REXX'
B = LENGTH(A)
SAY 'Length of A is =' B

Console output -
Length of A is =4

2) WORD - It gives the number of words in the given string.
Sample Program -

/*REXX*/

X = 'Use of  String function in REXX'
Y = LENGTH(X)
SAY 'No of words in X are =' Y

Console output -
'No of words in X are =6