- past of concatenate
In computer programming, concatenation is the operation of joining two character strings end to end. For example, the strings "foo" and "bar" may be concatenated to give "foobar". In programming languages, string concatenation is a binary operation usually accomplished by putting a concatenation operator between two strings (operands).
For example, the following expression uses the "+" symbol as the concatenation operator:
print "Hello " + "World";
which produces the output:
Different languages use different operators. Most languages use the "+" sign though several deviate from this norm.
For a more detailed comparison, please see the concatenation comparison article.
For example, in PHP and Perl:
//Example 1 (concatenation operator ".") $var = "Hello "; $var = $var . "World";
//Example 2 (combined assignment and concatenation ".=") $var = "Hello "; $var .= "World";
Both examples produce the same result.
InterpolationSome languages, (such as Perl, PHP, and most Unix shells), support variable interpolation as an alternative form of string concatenation.
For example, in Perl, the concatenation syntax:
my $stringVar; $stringVar = "World"; print "Hello " . $stringVar;
can be substituted with the string literal syntax:
my $stringVar; $stringVar = "World"; print "Hello $stringVar";
- Concatenation of languages (different from concatenation on strings)
concatenated in Bulgarian: Конкатенация
concatenated in German: Konkatenation (Listen)
concatenated in Spanish: Concatenación
concatenated in French: Concaténation
concatenated in Galician: Concatenación
concatenated in Dutch: Concatenatie
concatenated in Polish: Konkatenacja
concatenated in Russian: Конкатенация
concatenated in Simple English: Concatenation
concatenated in Swedish: Konkatenering
concatenated in Turkish: Concatenation
concatenated in Chinese: 串接