IntegerDigits
The digits of n in the given base (default 10), most significant first.
Wikipedia
Numerical digitMathWorldDigitWikidataQ82990Wolfram LanguageIntegerDigits✓Rosetta CodeSum digits of an integerIntegerDigits(n)digits of IntegerDigits(n, base)digits of IntegerDigits(n, base, len)the Details
- Digits come out most significant first, matching ordinary positional notation.
- The sign of n is discarded, so negative integers give the same digits as their absolute value.
- IntegerDigits(0) is
-- there's always at least one digit. - The 3-argument form keeps only the len least-significant digits, truncating or zero-padding as needed.
- Inverted by FromDigits.
Examples
See also: DigitCount, FromDigits, IntegerString