WLJS LogoWLJS Notebook

StringRiffle

StringRiffle[{s1, s2, s3, ...}] concatenates strings with spaces between them.

StringRiffle[list, sep] uses sep as the separator.

Examples

Join with spaces:

StringRiffle[{"a", "b", "c"}]
(* "a b c" *)

Join with custom separator:

StringRiffle[{"a", "b", "c"}, ", "]
(* "a, b, c" *)

With delimiters:

StringRiffle[{"a", "b", "c"}, {"[", ", ", "]"}]
(* "[a, b, c]" *)

Please visit the official Wolfram Language Reference for more details.

On this page