Logo

Programming-Idioms

History of Idiom 76 > diff from v19 to v20

Edit summary for version 20 by :

Version 19

2015-08-22, 22:48:37

Version 20

2015-08-22, 22:48:38

Idiom #76 Binary digits from an integer

Create the string s of integer x written in base 2.

E.g. 13 -> "1101"

Idiom #76 Binary digits from an integer

Create the string s of integer x written in base 2.

E.g. 13 -> "1101"

Code
var s = i.toRadixString(2);
Doc URL
https://api.dartlang.org/apidocs/channels/stable/dartdoc-viewer/dart:core.int#id_toRadixString