The concatenation of two strings and
is the string
formed by joining
and
. Thus the concatenation of the strings
"book" and "case" is the string "bookcase".
The concatenation of two strings
and
is often denoted
,
,
or, in the Wolfram Language,
. Concatenation is an associative operation, so that the concatenation of three or more
strings, for example
,
, etc., is well-defined.
The concatenation of two or more numbers is the number formed by concatenating their numerals. For example, the concatenation of 1, 234, and 5678 is 12345678. The value of the result depends on the numeric base, which is typically understood from context.
For nonnegative integers and
written without leading zeros in
an integer base
, the formula for concatenation is
where
is the number length of
in base
. For
,
, where
is the floor function,
while
.