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.
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 ||.
Discovered by embedding cosine similarity (sentence-transformers MiniLM, 384-dim).