Logo

Programming-Idioms

History of Idiom 55 > diff from v72 to v73

Edit summary for version 73 by lab419:
[Elixir] Alternative, more often used, solution

Version 72

2019-09-26, 14:06:58

Version 73

2019-09-26, 14:07:22

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
Demo URL
http://play.elixirbyexample.com/s/3a222c1ed8