StrictlySpeaking (strictly_speaking v0.1.1)
Implements a single function, say/2
, which returns textual representation
of a given integer in a given language.
Link to this section Summary
Functions
Accepts an integer and a language symbol. Returns a string containing human-readable representation of given number.
Link to this section Functions
Link to this function
say(number, language)
Accepts an integer and a language symbol. Returns a string containing human-readable representation of given number.
List of supported languages:
:ua
- Ukrainian,:en
- English.
Raises an ArgumentError in case number
is not an integer,
or language
is not among supported.
Examples
iex> StrictlySpeaking.say(7, :ua)
"сім"
iex> StrictlySpeaking.say(17, :en)
"seventeen"