Product Documentation
Cadence SKILL Language Reference
Product Version IC23.1, November 2023

rindex

rindex( 
t_string1 
S_string2 
) 
=> t_result / nil 

Description

Returns a string consisting of the remainder of string1 beginning with the last occurrence of string2.

Compares two strings. Similar to index except that it looks for the last (that is, rightmost) occurrence of the symbol or string S_string2 in string t_string instead of the first occurrence.

Arguments

t_string1

String to search for the last occurrence of S_string2.

S_string2

String or symbol to search for.

Value Returned

t_result

Remainder of t_string1 starting with last match of S_string2.

nil

There is no match.

Examples

rindex( "dandelion" "d") 
=> "delion"

Related Topics

String Functions

nindex


Return to top
 ⠀
X