View Source InrWord (inr_word v0.1.0)
Provides a function inr_word
to to convert any number and return a map with no and words as keys
Takes three params. the second and third are optional and default to "₹" for rupee and "paisa' for paisa"
# Example
iex(1)> InrWord.inr_word(70_000_000_000_000.99) # adds defaults "₹" & "paisa"
%{
no: "₹ 70,00,000,00,00,000.99",
words: "₹ Seventy lac crore and ninety-nine paisa"
}
iex(1)> InrWord.inr_word(70_000_000_000_000.99, "Rs.") # adds defaults "paisa"
%{
no: "Rs. 70,00,000,00,00,000.99",
words: "Rs. Seventy lac crore and ninety-nine paisa"
}
iex(1)> InrWord.inr_word(70_000_000_000_000.99, "Rs.", "")
%{
no: "Rs. 70,00,000,00,00,000.99",
words: "Rs. Seventy lac crore and ninety-nine"
}
iex(1)> InrWord.inr_word(70_000_000_000_000.99, "", "") # No defaults applied
%{
no: "70,00,000,00,00,000.99",
words: "Seventy lac crore and ninety-nine"
}
Link to this section Summary
Functions
# A Function to add default values and calll 'inr_word/3'
# Converts a given number into both number and word strings.
Link to this section Functions
# A Function to add default values and calll 'inr_word/3'
# Converts a given number into both number and word strings.