Sha256: 2fa032242c6d9927558d4e6d52449c74dbf2f378661ba3867c0384926fdddfd9
Contents?: true
Size: 275 Bytes
Versions: 185
Compression:
Stored size: 275 Bytes
Contents
object Atbash { private def substitute(c: Char) = if (c.isDigit) c.toString else if (c.isLetter) ('a' + ('z' - c.toLower)).toChar.toString else "" def encode(s: String): String = s.foldLeft("")((acc, c) => acc + substitute(c)).grouped(5).mkString(" ") }
Version data entries
185 entries across 185 versions & 1 rubygems