#base #digits #integer #radix #palindrome

no-std radixal

Digits iteration for unsigned integer types

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

#850 in Algorithms

Download history 9/week @ 2021-08-15 41/week @ 2021-08-22 1/week @ 2021-08-29 2/week @ 2021-09-05 13/week @ 2021-09-26 6/week @ 2021-10-10 2/week @ 2021-10-24 19/week @ 2021-10-31 84/week @ 2021-11-07 7/week @ 2021-11-14 6/week @ 2021-11-21 15/week @ 2021-11-28

112 downloads per month

MIT license

27KB
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

~140KB

AR]