To concatenate two or more string values yields a string whose length is the sum of the lengths of the source strings, and which is composed of the characters of the first string, in order, followed by the characters of the second (and subsequent), likewise in order. More loosely put, it is the result of appending the strings together.

For instance, the concatenation of the strings foo and bar is the string foobar.

The concatenation of strings may be considered equivalent to the set concatenation of singleton sets whose members are those strings.

Programming languages that deal easily with strings -- such as Perl and Python -- frequently declare operators to perform set concatenation. Other languages -- such as C -- often carry a concatenation function in their standard libraries. Here are the concatenation operators and functions work in a few common and less-common languages: