Logo

Programming-Idioms

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

Be concise.

Be useful.

All contributions dictatorially edited by webmasters to match personal tastes.

Please do not paste any copyright violating material.

Please try to avoid dependencies to third-party libraries and frameworks.

Other implementations
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;
var s = a + b;
var s = '$a$b';
s = a <> b
s = a // b
s := a + b
s = a <> b
s = a ++ b
const s = a + b;
String s = "%s%s".formatted(a, b);
String s = a.concat(b);
String s = a + b;
import java.util.Formatter;
StringBuilder t = new StringBuilder(a);
Formatter f = new Formatter(t);
f.format("%s", b).flush();
String s = t.toString();
val s = a + b
local s = a..b
$s = $a.$b;
s := a + b;
my $s = $a . $b;
s = a + b
s = f'{a}{b}'
s = a + b
let s = a + b;
let s = format!("{}{}", a, b);
s = a & b