Logo

Programming-Idioms

  • Pascal
  • C++
  • Elixir
s = "#{i}"
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
Str(i,s);

No dependecies on any library.
Should work in all Pascal dialects.
uses SysUtils;
var
  _s: String;
  _i: Integer;
begin
  _s := IntToStr(_i);
end.
#include <string>
auto s = std::to_string(i);
S : String := Integer'Image (I);

New implementation...