This package converts numbers to its written form.
Convert a Float to its written form after rounding it to the nearest integer.
import NumberToWords
NumberToWords.roundToWords 1255.20
--> "one thousand, two hundred fifty-five"
NumberToWords.roundToWords 1232551.50
--> "one million, two hundred thirty-two thousand, five hundred fifty-two"Convert a Float to its written form after rounding it down.
import NumberToWords
NumberToWords.floorToWords 1255.20
--> "one thousand, two hundred fifty-five"
NumberToWords.floorToWords 1232551.20
--> "one million, two hundred thirty-two thousand, five hundred fifty-one"Convert a Float to its written form after rounding it up.
import NumberToWords
NumberToWords.ceilingToWords 1255.20
--> "one thousand, two hundred fifty-six"
NumberToWords.ceilingToWords 1232551.20
--> "one million, two hundred thirty-two thousand, five hundred fifty-two"
Convert an
Intto its written form.