Strings in Rexx are denoted by a sequence of characters. The following program is an example of strings −
/* Main program */ a = "This is a string" say a
The output of the above program is as follows −
This is a string
Let’s discuss some methods which are available in Rexx for strings.
|Sr.No.||Methods available in Rexx for Strings|
This method returns a certain number of characters from the left of the string.
This method returns a certain number of characters from the right of the string.
This method returns the number of characters in the string.
This method returns the characters in a reverse format.
This method compares 2 strings. Returns "0" if "string1" and "string2" are identical. Otherwise, it returns the position of the first character that does not match.
This method copies a string n number of times.
This method gets a sub string from a particular string.
This method returns the position of one string within another.
This method deletes a sub string from within a string.