This line is creating a ``StringOps`` instance at each iteration. It probably doesn't matter, but may be better to simply call ``codeString.charAt``.