StringJoin
✖
StringJoin
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)Summary of the most common use cases

https://wolfram.com/xid/0tzjyhiq-n5x

Use InputForm to show string quotes:

https://wolfram.com/xid/0tzjyhiq-unl


https://wolfram.com/xid/0tzjyhiq-i7i

Scope (4)Survey of the scope of standard use cases
StringJoin works with special characters:

https://wolfram.com/xid/0tzjyhiq-o3

Join strings, with a newline in between:

https://wolfram.com/xid/0tzjyhiq-i96

StringJoin preserves formatting information embedded in strings:

https://wolfram.com/xid/0tzjyhiq-nx


https://wolfram.com/xid/0tzjyhiq-4ynthx

Applications (4)Sample problems that can be solved with this function
Iteratively join a string to its reverse:

https://wolfram.com/xid/0tzjyhiq-en7


https://wolfram.com/xid/0tzjyhiq-rh3


https://wolfram.com/xid/0tzjyhiq-w0w

Join a list of words, after inserting spaces in between:

https://wolfram.com/xid/0tzjyhiq-l2l


https://wolfram.com/xid/0tzjyhiq-v30


https://wolfram.com/xid/0tzjyhiq-ibo

Properties & Relations (1)Properties of the function, and connections to other functions
StringJoin acts as a kind of inverse to Characters:

https://wolfram.com/xid/0tzjyhiq-bzs


https://wolfram.com/xid/0tzjyhiq-nbx

Possible Issues (1)Common pitfalls and unexpected behavior
StringJoin works only with explicit strings:

https://wolfram.com/xid/0tzjyhiq-exu


Use ToString to convert to a string:

https://wolfram.com/xid/0tzjyhiq-nxq

Wolfram Research (1988), StringJoin, Wolfram Language function, https://reference.wolfram.com/language/ref/StringJoin.html (updated 2020).
Text
Wolfram Research (1988), StringJoin, Wolfram Language function, https://reference.wolfram.com/language/ref/StringJoin.html (updated 2020).
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.
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
Wolfram Language. (1988). StringJoin. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/StringJoin.html
BibTeX
@misc{reference.wolfram_2025_stringjoin, author="Wolfram Research", title="{StringJoin}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/StringJoin.html}", note=[Accessed: 19-June-2025
]}
BibLaTeX
@online{reference.wolfram_2025_stringjoin, organization={Wolfram Research}, title={StringJoin}, year={2020}, url={https://reference.wolfram.com/language/ref/StringJoin.html}, note=[Accessed: 19-June-2025
]}