StringRiffle
StringRiffle[{s1,s2,s3,…}]
creates a string by concatenating all the si, with spaces inserted between them.
StringRiffle[{{s11,s12,…},{s21,s22,…},…}]
creates a string by concatenating the sij, and inserting spaces at the lowest level and newlines at the higher level.
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.
StringRiffle[list,sep1,sep2,…]
inserts separator sepi between elements of list at level i.
Details
- Any element of list that is not a string is converted to a string using TextString.
- In StringRiffle[list], spaces are used as separators at the lowest level. At the next level up, newlines are used. At each higher level, successively more newlines are used.
Examples
open allclose allBasic Examples (2)
Generalizations & Extensions (1)
Applications (3)
Properties & Relations (1)
Values that are not strings are converted to strings using TextString:
Text
Wolfram Research (2015), StringRiffle, Wolfram Language function, https://reference.wolfram.com/language/ref/StringRiffle.html.
CMS
Wolfram Language. 2015. "StringRiffle." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/StringRiffle.html.
APA
Wolfram Language. (2015). StringRiffle. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/StringRiffle.html