1 unstable release

0.1.0 Mar 19, 2023

#25 in #num

MIT license

10KB
197 lines

num-width

Trait to determine number width.

Example:

use num_width::NumberWidth;

assert_eq!(15u8.width(), 2);
assert_eq!((-7i8).signed_width(), 2);

lib.rs:

Traits to determine the width of a number.

Dependencies

~100KB