factor/basis/io/encodings/string/string.factor

11 lines
311 B
Factor
Raw Normal View History

! Copyright (C) 2008 Daniel Ehrenberg.
! See http://factorcode.org/license.txt for BSD license.
2008-03-05 20:12:40 -05:00
USING: io io.streams.byte-array ;
IN: io.encodings.string
2008-03-05 20:12:40 -05:00
: decode ( byte-array encoding -- string )
<byte-reader> stream-contents ;
2008-03-05 20:12:40 -05:00
: encode ( string encoding -- byte-array )
[ write ] with-byte-writer ;