Logo

Programming-Idioms

History of Idiom 55 > diff from v78 to v79

Edit summary for version 79 by programming-idioms.org:
[Elixir] Dead link: play.elixirbyexample.com has been down for a while

Version 78

2019-09-29, 19:17:34

Version 79

2019-10-14, 12:25:40

Idiom #55 Convert integer to string

Create the string representation s (in radix 10) of integer value i.

Illustration

Idiom #55 Convert integer to string

Create the string representation s (in radix 10) of integer value i.

Illustration
Extra Keywords
int base radix conversion
Extra Keywords
int base radix conversion
Code
s = Integer.to_string(i)
s = to_string(i)
Code
s = Integer.to_string(i)
s = to_string(i)
Comments bubble
Integer.to_string has checks if i is an Integer, to_string does not, whatever suits the usecase best.
Comments bubble
Integer.to_string has checks if i is an Integer, to_string does not, whatever suits the usecase best.
Doc URL
http://elixir-lang.org/docs/v1.0/elixir/Integer.html#to_string/1
Doc URL
http://elixir-lang.org/docs/v1.0/elixir/Integer.html#to_string/1
Demo URL
http://play.elixirbyexample.com/s/3a222c1ed8