What's a good Common Lisp function to convert a number into a string?
I wish to convert a number to string, as in: 42 -> "42"
Ultimately I want to concatenate a string and a set of numbers together into a set of symbols, like:
(loop for i upto 3
collect (concatenate 'string "foo" (some-conversion-function i)) into stngs
finally (return (mapcar #'read-from-strings stngs)))
-> foo0 foo1 foo2 foo3
All numbers are integers.
I've got everything working using (read-from-string (concatenate 'string …)) except that I'm missing a function that'll convert the number into a string or other sequence that'll concatenate into a string.
Alternatively, of course it'd be great if I could skip the strings altogether and just concatenate a symbol and a number into a symbol, as in: foo 0 -> foo0 …if someone could name a Common Lisp function that'd concatenate symbols directly.