Menu

StringRiffle

StringRiffle({s1, s2, s3, ...})

returns a new string by concatenating all the si, with spaces inserted between them.

StringRiffle(list, "sep")

inserts the separator sep between all elements in list.

StringRiffle(list, {"left", "sep", "right"})

use left and right as delimiters after concatenation.

Examples

>> StringRiffle({"a", "b", "c", "d", "e"})
a b c d e

>> StringRiffle({"a", "b", "c", "d", "e"}, ", ")
a, b, c, d, e

>> StringRiffle({"a", "b", "c", "d", "e"}, {"(", " ", ")"})
(a b c d e)

StringCases, StringContainsQ, StringCount, StringExpression, StringFreeQ, StringInsert, StringJoin, StringLength, StringMatchQ, StringPart, StringPosition, StringQ, StringReplace, StringSplit, StringTake, StringToByteArray, StringTrim

Implementation status

  • ✅ - full supported

Github

Feedback
Tell us anything that can be improved