Turn List into one String without Spaces

frank desben's icon

hi all,

what is a simple way to turn a list (e.g. [a, b, c, d]) into one string without spaces (e.g. "abcd")?

Thank you!

Best Frank

pdelges's icon

Maybe with [tosymbol], like in this example:

Max Patch
Copy patch and select New From Clipboard in Max.

tmhglnd's icon

If you are talking javascript (by the looks of your example) you can use the .join("") method with an empty string as argument.

var arr = [0, 1, 2, 3, 4];
var str = arr.join(""); //returns "01234"

Jan M's icon

If you want to stay in the Max domain check out [regex].