RosettaCodeData/Task/Bifid-cipher/Jq/bifid-cipher-1.jq
2023-07-09 17:42:30 -04:00

8 lines
194 B
Text

# _nwise is for gojq
def _nwise($n):
def n: if length <= $n then . else .[0:$n] , (.[$n:] | n) end;
n;
# Input: a string
# Output: a stream of strings
def chars: explode[] | [.] | implode;