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

lsprintf

lsprintf( 
t_formatString
[ g_arg1 ... ] 
) 
=> t_string

Description

Returns a string according to the provided format. lsprintf is a lambda version of the sprintf function that can be used as an argument with apply or funcall.

Refer to the Common Output Format Specifications table of the fprintf function. If nil is specified as the first argument, no assignment is made, but the formatted string is returned.

Arguments

t_formatString

Specifies the format string

g_arg1

Specifies the arguments following the format string that are printed corresponding to their format specifications.

Value Returned

t_string

Returns the formatted string

Examples

let( (format( "%d %d %s %L\n")
    printf_style_args( (list 42 41 "hello" (list "world"))))
    apply( 'lsprintf format printf_style_args))
=>"42 41 hello (\"world\")\n"

Related Topics

String Functions

sprintf


Return to top
 ⠀
X