rpos()

Function group Execute on client Platform(s)
String YES All

Syntax

rpos(substring,string)

Description

Returns the position of the last occurrence of substring in string, or zero if substring is not contained in string.

The substring must be contained within string in its entirety for the returned value to be non-zero. Also, the comparison is case sensitive.

Example

Calculate lResult as rpos('Mouse','Mickey Mouse')
; returns 8


Calculate lResult as rpos('mouse','Mickey Mouse')
; return 0, note case


Calculate lResult as rpos(' ','R S W Smith')
; returns 6, that is the position of the last space character