StringJoin
"s1"<>"s2"<>…, StringJoin["s1","s2",…], or StringJoin[{"s1","s2",…}]
yields a string consisting of a concatenation of the .
Details
- StringJoin has attribute Flat.
- StringJoin[BioSequence["type","seq"]…] will concatenate biomolecular sequences of the same type.
Background & Context
- StringJoin["s1","s2",…], which may also be written using the shorthand notation "s1"<>"s2"<>⋯, returns the string formed by the concatenation of strings "si". StringJoin ignores lists at any level in its arguments and so may be applied to nested list structures without the need for flattening. While StringJoin works only with explicit valid strings, ToString can often be used to convert non-string expressions into string form.
- StringJoin is related to a number of other symbols. In practice, StringJoin is an inverse of Characters, in the sense that StringJoin[Characters["string"]] and Characters[StringJoin[{"s","t","r","i","n","g"}]] return "string" and {"s","t","r","i","n","g"}, respectively. StringJoin is a String analog and/or generalization of the qualitatively similar functions Join, Append, Prepend, Catenate and JoinAcross. In particular, "s1"<>"s0" prepends and "s0"<>"s1" appends a string "s1" to a given string "s0". StringJoin should not be confused with StringExpression ("s1"~~"s2"~~⋯), which is used to specify string patterns. StringJoin is also related to and commonly used in conjunction with StringRiffle, StringRepeat, StringInsert, StringReplacePart and StringPartition.
Examples
open allclose allBasic Examples (2)
Scope (4)
StringJoin works with special characters:
Join strings, with a newline in between:
StringJoin preserves formatting information embedded in strings:
Applications (4)
Properties & Relations (1)
StringJoin acts as a kind of inverse to Characters:
Possible Issues (1)
Text
Wolfram Research (1988), StringJoin, Wolfram Language function, https://reference.wolfram.com/language/ref/StringJoin.html (updated 2020).
CMS
Wolfram Language. 1988. "StringJoin." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020. https://reference.wolfram.com/language/ref/StringJoin.html.
APA
Wolfram Language. (1988). StringJoin. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/StringJoin.html