Morse code encoder and decoder
In your mix.exs
:
defp deps do
[
{:morse, "~> 1.0.1"}
]
end
Then run mix deps.get
.
Morse.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 ?
.
Morse.decode(string)
Decodes the given Morse string back to English. Spaces and ?
are preserved.
MIT © Juan Soto