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

nindex

nindex( 
t_string1 
S_string2 ) 
=> x_result / nil 

Description

Finds the symbol or string, S_string2, in t_string1 and returns the character index, starting from one, of the first point at which the S_string2 matches part of t_string1.

Arguments

t_string1

String you want to search for S_string2.

S_string2

String you want to find occurrences of in t_string1.

Value Returned

x_result

Index corresponding to the point at which S_string2 matches part of t_string1. The index starts from one.

nil

No character match.

Examples

nindex( "abc" 'b )            
=> 2
nindex( "abcdabce" "dab" )  
=> 4
nindex( "abc" "cba" )  
=> nil

Related Topics

String Functions

getchar

substring


Return to top
 ⠀
X