digits function

Iterable<int> digits (int number, [ int base = 10 ])

Returns an iterable over the digits of the number, in the optionally given base.

Implementation

Iterable<int> digits(int number, [int base = 10]) {
  return new _DigitIterable(number.abs(), base);
}