elixirway v0.1.4 PigLatin

This is the main PigLatin module for translating words.

Summary

Functions

Finds the index of the first vowel in a word

Determines if a word starts with a vowel

Translates the given word to Piglatin

Functions

capitalized(word)
get_first_vowel_index(word)

Finds the index of the first vowel in a word.

Return the index of the first vowel or nil if none found.

Examples

iex> PigLatin.get_first_vowel_index("apple")
0
starts_with_vowel(word)

Determines if a word starts with a vowel.

Returns true if the word starts with a vowel. Otherwise false.

Examples

iex> PigLatin.starts_with_vowel("apple")
true
translate(word)

Translates the given word to Piglatin.

Returns the translated word.

Examples

iex> PigLatin.translate("apple")
"appleway"