Rust function
Converts numbers into English words using the short scale.
Supports positive integers from 0 to 999_999_999_999_999_999.
library function signature
Example
assert_eq!;
For the JavaScript version see jldec/shortscale.
Rust function
Converts numbers into English words using the short scale.
Supports positive integers from 0 to 999_999_999_999_999_999.
pub fn shortscale(num: u64) -> String
assert_eq!(
shortscale(420_000_999_015),
"four hundred and twenty billion nine hundred \
and ninety nine thousand and fifteen"
);
For the JavaScript version see jldec/shortscale.