Logo

Programming-Idioms

Create the string t as the concatenation of the string s and the integer i.
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
t : String := s & Integer'Image (i);
(def t (str s i))
#include <string>
auto t = s + std::to_string (i);
var t = $"{s} {i}";
import std.conv : to;
string t = s ~ to!string(i);
import std.format : format;
string t = "%s%d".format(s, i);
var t = '$s$i';
t =  s <>  to_string(i)
write (unit=t,fmt='(A,I0)') s, i
import "strconv"
t := s + strconv.Itoa(i)
import "fmt"
t := fmt.Sprintf("%s%d", s, i)
t = s ++ show i
let t = `${s}${i}`
let t = s + i;
String t = "%s%s".formatted(s, i);
String t = s + i;
(format nil "~a~d" s i)
t = s .. i
$t = $s . $i;
uses SysUtils;
t := s + IntToStr(i);
uses Sysutils;
t := s + i.ToString;
my $t = "$s$i";
my $t = $s . $i;
t = f"{s}{i}"
t = "#{s}#{i}"
t = s + i.to_s
let t = format!("{}{}", s, i);
let t = format!("{s}{i}");
val t = s + i
t := s, i asString.