Handbook
Glossary
ascii>binary ( seq -- seq' )
Vocabulary
uu
.
private
Inputs
seq
an
object
Outputs
seq'
an
object
Definition
USING:
kernel
make
math
math.bitwise
sequences
;
IN:
uu.private
::
ascii>binary
( seq -- seq' )
0
:>
char! 0
:>
bits! seq
unclip-slice
32
-
:>
len!
[
[
dup
empty?
not
len 0
>
and
]
[
dup
empty?
[
0
]
[
unclip-slice
]
if
dup
"\r\n\0"
member?
[
drop
0
]
[
check-illegal-character
32
-
]
if
char 6
shift
bitor
char! bits 6
+
bits! bits 8
>=
[
bits 8
-
[
char
swap
neg
shift
255
bitand
,
]
[
on-bits
char
bitand
char!
]
[
bits!
]
tri
len 1
-
len!
]
when
]
while
drop
]
""
make
;