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#
- D
- D
- Dart
- Elixir
- Fortran
- Go
- Go
- Haskell
- JS
- JS
- Java
- Java
- Lisp
- Lua
- PHP
- Pascal
- Pascal
- Perl
- Perl
- Python
- Python
- Python
- Python
- Ruby
- Ruby
- Rust
- Rust
- Scala
- Smalltalk
t : String := s & Integer'Image (i);
(def t (str s i))
string t = s ~ to!string(i);
The "cat operator" is built in the language. The conversion of the integer is a library routine.
var t = '$s$i';
t = s <> to_string(i)
write (unit=t,fmt='(A,I0)') s, i
This assumes that there is enough space in t.
t = s ++ show i
let t = s + i;
String t = s + i;
The operator + works fine.
String t = "%s%s".formatted(s, i);
(format nil "~a~d" s i)
my $t = "$s$i";
Using string interpolation
my $t = $s . $i;
Using concatenation
t = s + str(i)
t = '%s%s' % (s, i)
t = '{}{}'.format(s, i)
t = "#{s}#{i}"
val t = s + i
t := s, i asString.