Logo

Programming-Idioms

History of Idiom 55 > diff from v94 to v95

Edit summary for version 95 by programming-idioms.org:
[Elixir] 404

Version 94

2020-05-03, 21:18:13

Version 95

2020-05-10, 21:39: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)
s = "#{i}"
Code
s = Integer.to_string(i)
s = to_string(i)
s = "#{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
https://hexdocs.pm/elixir/Integer.html#to_string/1