Logo

Programming-Idioms

History of Idiom 55 > diff from v71 to v72

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

Version 71

2019-07-08, 20:22:53

Version 72

2019-09-26, 14:06:58

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)
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.
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