Logo

Programming-Idioms

History of Idiom 53 > diff from v2 to v3

Edit summary for version 3 by :

Version 2

2015-07-31, 19:37:39

Version 3

2015-08-01, 17:17:07

Idiom #53 Join a list of strings

Concatenate elements of string list x joined by the separator ", " to create a single string y.

Idiom #53 Join a list of strings

Concatenate elements of string list x joined by the separator ", " to create a single string y.

Code
y = x.join(", ");
Comments bubble
In this case, you could leave out the ", " string in join, as that's the default. I've included it to show that you can join with other delimiters, too.