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.
- Ada
- Clojure
- C++
- C#
- C#
- Dart
- Dart
- Elixir
- Fortran
- Go
- Haskell
- Haskell
- JS
- Java
- Java
- Java
- Java
- Kotlin
- Lua
- PHP
- Pascal
- Perl
- Python
- Python
- Ruby
- Rust
- Rust
- VB
S : constant String := A & B;
(def s (str a b))
string s = String.Concat(a,b);
a and b must not be null
string s = a + b;
var s = a + b;
s = a <> b
s = a // b
s = a <> b
Using the semigroup operator _<>.
s = a ++ b
const s = a + b;
String s = "%s%s".formatted(a, b);
String s = a.concat(b);
a cannot be null.
String s = a + b;
StringBuilder t = new StringBuilder(a);
Formatter f = new Formatter(t);
f.format("%s", b).flush();
String s = t.toString();
local s = a..b
$s = $a.$b;
s := a + b;
my $s = $a . $b;
s = a + b
s = f'{a}{b}'
let s = a + b;
This adds b to the current allocation of a, meaning that a needs to be a mutable String.
let s = format!("{}{}", a, b);
This allocates a new String with a and b concatenated.
s = a & b