Bored this Friday morning? Here is a little treat for you. Write a ColdFusion UDF that does the following:
- Takes a string as input.
- Converts every letter (ignoring spaces, numbers, or anything not a letter) into code using letter-substitution. In other words, A is equals to some random other letter, like X (and conversely, X is equal to A).
- The UDF should return the converted string, and a struct where each key is letter of the alphabet and the coded version. </ol> Basically you are building a tool that would let you create simple letter-substitution puzzles. This is not a contest. I'm not judging anything. This is just for fun. If it takes you more than five minutes to write it - stop - you lost. Don't worry about it. When you get your solution, either paste your code into the comments or just share a URL.