Rexx - find



This method is used to search for the first occurrence of a string in another string.

Syntax

find(string, phrase)

Parameters

  • string − The string value that needs to be searched for.

  • phrase − This is the value that needs to be searched for in the string.

Return Value

The method returns the word number of the first word of phrase in string.

Example

/* Main program */ 
options arexx_bifs 
say find(' Hello World ','World') 

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

Output

2
rexx_regina.htm
Advertisements