This site is supported by donations to The OEIS Foundation.

Concatenation

From OeisWiki
Jump to: navigation, search


This article needs more work.

Please help by expanding it!


Concatenation is an operation in which two or more strings of characters are joined together as one string. For example, "235711131719" is the concatenation of the base 10 representations of the first eight prime numbers.

In the field of computer programming, string concatenation is the operation of joining two character strings end-to-end. For example, the strings "Oeis" and "Wiki" may be concatenated to give "OeisWiki". In many programming languages, string concatenation is expressed as a simple binary operator: For example, the term "Oeis"+"Wiki" is equivalent to the simple string "OeisWiki".

Some computer programming languages overload the addition operator + as a concatenation operator for text data types; thus 2 + 3 = 5 but "2" + "3" = "23". So far in the OEIS a few different concatenation operators have been used, e.g., 2//3//5//7//11//13//17//19 (like FORTRAN), 2U3U5U7U11U13U17U19 (probably an acceptable solution as long as it's not needed for bases 31 to 36), 2.3.5.7.11.13.17.19 (offering potential confusion both with decimal points and multiplication operators). See the Index for examples of the different syntaxes used in the OEIS.

This variety of concatenation operators is reflected in the history of Maple, which used to use periods as concatenation operators, but for the last few versions has been using "||" instead.[1]

References

  1. Robert Israel, posting to SeqFan, June 16, 2011

External links