concatenation
Sign in to saveAlso known as string concatenation
thumb|upright=2| A spreadsheet's concatenate ("&") function is used to assemble a complex text string—in this example, XML code for an [[SVG "circle" element.]] In formal language theory and computer programming, string concatenation is the operation of joining character strings end-to-end. For example, the concatenation of "snow" and "ball" is "snowball". In certain formalizations of concatenation theory, also called string theory, string concatenation is a primitive notion.
In the Vinony graph
Vinony's link graph records 280 inbound references to concatenation, and connects out to program loop, string and program operator.
Vinony files it under Formal languages, Operators (programming) and String (computer science).
Vinony links it to 28 Wikipedia language editions.
Wikidata facts
- Subclass of
- connection
Show 6 more facts
- definition domain
- string
- image of function
- string
- does not have characteristic
- commutative property
- has characteristic
- associativity
- Stack Exchange tag
- stackoverflow.com/tags/concatenation
- maintained by WikiProject
- WikiProject Mathematics
via Wikidata · CC0
~6 min read
Encyclopedic overview
12 sectionsContents
- Syntax
- Implementation
- Concatenation of sets of strings
- Algebraic properties
- Applications
- Audio and telephony
- Database theory
- Recreational mathematics
- See also
- References
- Citations
- Sources
thumb|upright=2| A spreadsheet's concatenate ("&") function is used to assemble a complex text string—in this example, XML code for an [[SVG "circle" element.]] In formal language theory and computer programming, string concatenation is the operation of joining character strings end-to-end. For example, the concatenation of "snow" and "ball" is "snowball". In certain formalizations of concatenation theory, also called string theory, string concatenation is a primitive notion.
==Syntax== In many programming languages, string concatenation is a binary infix operator, and in some it is written without an operator. This is implemented in different ways: Overloading the plus sign + Example from C#: "Hello, " + "World" has the value "Hello, World". Dedicated operator, such as . in PHP, & in Visual Basic, and || in SQL. This has the advantage over reusing + that it allows implicit type conversion to string. string literal concatenation, which means that adjacent strings are concatenated without any operator. Example from C: "Hello, " "World" has the value "Hello, World". Interpolation, using a string interpolater to concatenate. Example from C#: $"{hello}{world}", where string hello = "Hello, "; and string world = "World"; Formatting, using a string formatter to concatenate. Example from Java: String.format("%s%s", "Hello, ", "World") In many scientific publications or standards the concatenation operator notation used is ||.
Excerpted from Wikipedia’s “concatenation” article, available under the CC BY-SA 4.0 licence.