sunterlib/s48/hawk-dns-server/util.scm

6 lines
197 B
Scheme

(define (string->byte-vector str)
(let ((vec (make-byte-vector 0 0)))
(do ((i 0 (+ i 1)))
((= i (string-length str)) vec)
(byte-vector-set! vec (char->integer (string-ref str i))))))