Sha256: f50014441b06c0f5c19b5e7544a94ee1528c1e1b1efed271eda3319b7922cf41
Contents?: true
Size: 718 Bytes
Versions: 162
Compression:
Stored size: 718 Bytes
Contents
fun chunkify chunkSz s = let val sz = size s fun chunker 0 _ = chunker chunkSz (substring (s, 0, chunkSz)) | chunker i acc = if sz = i then acc else if sz - i < chunkSz then acc ^ " " ^ substring (s, i, size s - i) else chunker (i + chunkSz) (acc ^ " " ^ substring (s, i, chunkSz)) in if chunkSz > sz then s else chunker 0 "" end fun cipher c = let open Char val n = ord #"z" + ord #"a" val c = toLower c in if isAlpha c then (toString o chr) (n - ord c) else if isDigit c then toString c else "" end val decode = String.translate cipher val encode = (chunkify 5) o decode
Version data entries
162 entries across 162 versions & 1 rubygems