Handbook
Glossary
>base62 ( seq -- base62 )
Base62 conversions
Next:
base62> ( base62 -- seq )
Vocabulary
base62
Inputs
seq
a
sequence
Outputs
base62
a
sequence
Word description
Encode into Base62 encoding.
Definition
USING:
base62.private
endian
kernel
math
sequences
;
IN:
base62
::
>base62
( seq -- base62 )
BV{
}
clone
:>
accum seq
[
zero?
not
]
find
[
drop
seq
length
]
unless
:>
i seq i
tail-slice
be>
[
62
/mod
ch>base62
accum
push
]
until-zero
i
alphabet
first
[
accum
push
]
curry
times
accum
reverse!
B{
}
like
;