Friday Puzzler: First steps to the NSA...

Bored this Friday morning? Here is a little treat for you. Write a ColdFusion UDF that does the following:

  1. Takes a string as input.
  2. 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).
  3. The UDF should return the converted string, and a struct where each key is letter of the alphabet and the coded version.

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.

Raymond Camden's Picture

About Raymond Camden

Raymond is a developer advocate. He focuses on JavaScript, serverless and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA