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

concat

concat( 
Sx_arg1 
[ Sx_arg2 ... ] 
) 
=> s_result

Description

Concatenates strings, symbols, or integers into a single symbol.

This function is useful for converting strings to symbols. To concatenate several strings and have a single string returned, use the strcat function. Symbol names are limited to 255 characters.

Symbol functions such as eq, memq, and caseq are much faster than their siblings equal, member, and case because they compare pointers rather than data. You can use concat to convert a string to a symbol before performing memq on large lists for increased speed.

Arguments

Sx_arg1

String, symbol, or integer to be concatenated.

Sx_arg2

Zero or more strings, symbols, or integers to be concatenated.

Value Returned

s_result

Returns a symbol whose print name is the result of concatenating the printed representation of the argument or arguments.

Examples

This demonstrates using concat to take advantage of the faster functions such as memq.

concat("string")                      
=> string
concat("ab" 123 'xy)                  
=> ab123xy
memq( concat( "c" ) '(a b c d e))     
=> (c d e)

Related Topics

strcat

member, memq, memv


Return to top
 ⠀
X