-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Labels
duplicateThis issue or pull request already existsThis issue or pull request already exists
Description
Name the function, DigitsOf
.
The function should return a byte array containing the digits of a given integer, with the most significant digit being the first element of the array and the least significant digit being the last element.
For negative integers, only the digits are to be returned. The sign of the number will be discarded.
The function should work for different bases. Returned digits are in decimal, so the digits value of 15
in hex will be [15]
, while the digits of the same value in decimal will be [1,5]
.
Zero will be treated as a special case: [0]
will be returned rather than an empty array.
Metadata
Metadata
Assignees
Labels
duplicateThis issue or pull request already existsThis issue or pull request already exists