Create a function that takes a string as an argument and returns the Morse code equivalent.
Examples
EncodeMorse("EDABBIT CHALLENGE") ➞ ". -.. .- -... -... .. - -.-. .... .- .-.. .-.. . -. --. ."
EncodeMorse("HELP ME !") ➞ ".... . .-.. .--. -- . -.-.--"
Notes
- Ouput should be International Morse Code, and use the standard conventions for symbols not defined inside the ITU recommendation (see Resources).
- Input value can be lower or upper case.
- Input string can have digits.
- Input string can have some special characters (e.g. comma, colon, apostrophe, period, question mark, exclamation mark).
- One space
" " is expected after each character.