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
|
Zero or more strings, symbols, or integers to be concatenated. |
Value Returned
|
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
Return to top