morse v1.0.0
Morse
Encodes English into Morse code and decodes Morse code into English.
Summary
Decodes the given Morse string back to English. Spaces and ?
are preserved
Encodes the given string to Morse code. Spaces are preserved and all characters are uppercased before encoding
Functions
Decodes the given Morse string back to English. Spaces and ?
are preserved.
Examples
iex> Morse.decode("-... .- -. .- -. .-")
"BANANA"
Encodes the given string to Morse code. Spaces are preserved and all characters are uppercased before encoding.
Characters outside the Morse scope become ?
.
Examples
iex> Morse.encode("This is a doctest")
"- .... .. ... ...... .. ... ...... .- ...... -.. --- -.-. - . ... -"