5 unstable releases
0.3.0 | Nov 13, 2019 |
---|---|
0.2.2 | Oct 21, 2019 |
0.2.1 | Oct 8, 2019 |
0.2.0 | Oct 3, 2019 |
0.1.0 | Oct 1, 2019 |
#2659 in Algorithms
29 downloads per month
Used in factor-rs
28KB
389 lines
radixal
Digits iteration for unsigned integer types.
The IntoDigits
trait offers a number of methods to facilitate dealing with
unsigned integers as digits.
For less simple uses, the DigitsIterator
implements a number of methods to
manipulate the number in place, offering more control than the IntoDigits
trait.
Features
This crate can be used without the standard library.
The DigitsIterator
struct as well as the IntoDigits
trait are only
implemented for primitive unsigned types: u8
, u16
, u32
, u64
, u128
,
usize
as well as their corresponding Wrapping
types.
Internal numerical operations use wrapping semantics when required, both for the sake of simplicity and performance. It is expected that checked operations will be used in a future version, while tying wrapping operations to an optional feature for performance sensitive uses.
lib.rs
:
Radixal provides the IntoDigits
trait to simplify treating unsigned
integer types as a sequence of digits under a specified radix.
Dependencies
~150KB