- :block
digits
get array of digits of given number
Parameters
digits number :integer
Attributes
base | :integer | use given based (default: 10) |
Returns
Examples
copydigits 123 ; => [1 2 3] digits 0 ; => [0] digits neg 12345 ; => [1 2 3 4 5] ; digits 1231231231231231231231231231023 ; => [1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 2 3 1 0 2 3]