Ad
  • Custom User Avatar

    Clever as hell; arguably not best practices, though, since most devs don't know too much Regex and wouldn't be able to debug this.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    I do agree that this is an awesome and clever solution which perfectly utilizes the translate function. However, it is interesting to consider that there's limited room to scale this solution. With a large translation table, it becomes difficult to track which value needs to be translated to which other value. When you pair them off, as in many of the other solutions, it's easy to find the areas which need to be changed.