Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!

Idiom #289 Concatenate two strings

Create the string s by concatenating the strings a and b.

var s = '$a$b';
var s = a + b;
S : constant String := A & B;
(def s (str a b))
#include <iostream>
#include <string>
std::string a{"Hello"};
std::string b{"world"};
auto s = a + b;
string s = String.Concat(a,b);
string s = a + b;
s = a <> b
s = a // b
s := a + b
s = a <> b
s = a ++ b
const s = a + b;
String s = a.concat(b);
String s = a + b;
String s = String.format("%s%s", a, b);
val s = a + b
local s = a..b
$s = $a.$b;
s := a + b;
my $s = $a . $b;
s = a + b
s = a + b
let s = a + b;
let s = format!("{}{}", a, b);
s = a & b

New implementation...