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