Logo

Programming-Idioms

  • Kotlin
  • C++
  • Python
  • Rust
  • PHP
  • Scala
  • C
  • Elixir
s = Integer.to_string(i)

Integer.to_string checks if i is an Integer.
s = to_string(i)

Doesn't check if i is an Integer
s = "#{i}"
val s = i.toString()
#include <string>
auto s = std::to_string(i);
s = str(i)
let s = i.to_string();

s has type String
let s = format!("{}", i);

s has type String
$s = strval($i);
$s = "$i";
$s = "{$i}";
$s = (string)$i;
val s = i.toString
#include <stdlib.h>
char s[0x1000]={};
itoa(i,s,10);
S : String := Integer'Image (I);

New implementation...