: reader-loop ( -- ) read1 [ dup CHAR: \ = [ drop read1 { { CHAR: d [ CHAR: 0 10 random + write1 ] } } case ] [ write1 ] if reader-loop ] when* ; : convert ( str -- str' ) [ [ reader-loop ] with-string-writer ] with-string-reader ;