morse v1.0.0 Morse

Encodes English into Morse code and decodes Morse code into English.

Summary

Functions

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

decode(string)

Decodes the given Morse string back to English. Spaces and ? are preserved.

Examples

iex> Morse.decode("-... .- -. .- -. .-")
"BANANA"
encode(string)

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")
"- .... .. ... ...... .. ... ...... .- ...... -.. --- -.-. - . ... -"