Sun Studio 12: Fortran Library Reference

1.4.27.2 rindex: Last Occurrence of a Substring in a String

The function is called by:

INTEGER*4 rindex

n = rindex( a1, a2 )

a1

character

Input 

Main string 

a2

character

Input 

Substring 

Return value 

INTEGER*4 orINTEGER*8

Output 

n>0: Index of last occurrence of a2 in a1

n=0: a2 does not occur in a1INTEGER*8 returned in 64-bit environments