Logo

Programming-Idioms

History of Idiom 55 > diff from v41 to v42

Edit summary for version 42 by :
New Scala implementation by user [meshelton]

Version 41

2016-02-16, 21:32:24

Version 42

2016-02-18, 16:58:00

Idiom #55 Convert integer to string

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

Idiom #55 Convert integer to string

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

Code
String s = Integer.parseInt(i);
Code
String s = Integer.parseInt(i);
Doc URL
https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html
Doc URL
https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html
Code
S : String := Integer'Image (I);
Code
S : String := Integer'Image (I);
Code
string s = i.ToString()
Code
string s = i.ToString()
Doc URL
https://msdn.microsoft.com/en-us/library/6t7dwaa5(v=vs.110).aspx
Doc URL
https://msdn.microsoft.com/en-us/library/6t7dwaa5(v=vs.110).aspx
Code
(let [s (str i)])
Code
(let [s (str i)])
Doc URL
https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html#parseInt-java.lang.String-
Doc URL
https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html#parseInt-java.lang.String-
Code
var num = 10

var s = num.toString();
Code
var num = 10

var s = num.toString();
Comments bubble
clarfication
Comments bubble
clarfication
Doc URL
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toString
Doc URL
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toString
Demo URL
https://jsfiddle.net/kcfh1qbm/
Demo URL
https://jsfiddle.net/kcfh1qbm/