Crates.io | intname |
lib.rs | intname |
version | 0.2.0 |
source | src |
created_at | 2021-07-28 00:55:59.602275 |
updated_at | 2021-07-28 01:37:33.543835 |
description | Full English name for any integer of any primitive integer type. |
homepage | |
repository | https://github.com/cabralski/intname |
max_upload_size | |
id | 428128 |
size | 19,761 |
intname
is a tiny crate for generating integer names based on any integer type ranging from u8
to u128
and i8
to i128
.
The maximum scalar value supported for integers is u128::MAX
.
use intname::integer_name;
assert_eq!(&integer_name(42), "forty-two")
Huge signed
or unsigned
integers can be parsed in nanoseconds.
use intname::integer_name;
assert_eq!(&integer_name(170141183460469231731687303715884105727i128), "one hundred seventy undecillion, one hundred forty-one decillion, one hundred eighty-three nonillion, four hundred sixty octillion, four hundred sixty-nine septillion, two hundred thirty-one sextillion, seven hundred thirty-one quintillion, six hundred eighty-seven quadrillion, three hundred three trillion, seven hundred fifteen billion, eight hundred eighty-four million, one hundred five thousand, seven hundred twenty-seven");