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

getchar

getchar( 
S_arg 
x_index 
) 
=> s_char / nil

Description

Returns an indexed character of a string or the print name if the string is a symbol. Unlike the C library, the getc and getchar SKILL functions are totally unrelated.

Arguments

S_arg

Character string or symbol.

x_index

Number corresponding to an indexed point in S_arg.

Value Returned

s_char

Single character symbol corresponding to the character in S_arg indexed by x_index.

nil

If x_index is less than 1 or greater than the length of the string.

Examples

getchar("abc" 2)  
=> b
getchar("abc" 4)  
=> nil

Related Topics

String Functions

nindex

parseString

strlen

substring


Return to top
 ⠀
X