DC Challenge: If you can read this...
Hey Community,
Here's a new CodeGolf challenge for you! Check the details in this post.
Task
You'll have to translate a string into a Pilot's alphabet (NATO phonetic alphabet).
Input:
If, you can read?
Output:
India Foxtrot, Yankee Oscar Uniform Charlie Alfa November Romeo Echo Alfa Delta ?
Note:
- The set of used punctuation is
,.!?
- Punctuation should be kept in your return string, but (original) spaces should not
- Xray should not have a dash within
- Every word and punctuation mark should be separated by a space ' '
- There should be no trailing whitespace
- Use this code to check the result length
- You also can use this test case here
Share your solutions in comments!
Shortest answer wins!