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

Idiom #153 Concatenate string with integer

Create string t as the concatenation of string s and integer i.

String t = s + i;
import "fmt"
t := fmt.Sprintf("%s%d", s, i)
  t := s + IntToStr(i);
t = s + i.to_s
let t = format!("{}{}", s, i);

Do you know the best way to do this in your language ?
New implementation...

Idiom created by

Related idioms