Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference
A newer version of this document is available. Customers should click here to go to the newest version.
Visible to Intel only — GUID: GUID-B68A36BD-9BFE-4376-ABF1-A58B7C85B021
Visible to Intel only — GUID: GUID-B68A36BD-9BFE-4376-ABF1-A58B7C85B021
RINDEX
Portability Function: Locates the index of the last occurrence of a substring within a string.
Module
USE IFPORT
result = RINDEX (string,substr)
string |
(Input) Character*(*). Original string to search. |
substr |
(Input) Character*(*). String to search for. |
Results
The result type is INTEGER(4). The result is the starting position of the final occurrence of substrg in string. The result is zero if substring does not occur in string.
Example
USE IFPORT character*80 mainstring character*4 shortstr integer(4) where mainstring="Hello Hello Hello Hello There There There" shortstr="Hello" where=rindex(mainstring,shortstr) ! where is 19