Handbook
Glossary
prolog-encoding ( string -- iana-encoding )
Vocabulary
io
.
encodings
.
detect
.
private
Inputs
string
an
object
Outputs
iana-encoding
an
object
Definition
USING:
continuations
kernel
math
sequences
;
IN:
io.encodings.detect.private
:
prolog-encoding
( string -- iana-encoding )
[
dup
"encoding="
subseq-index
10
+
swap
[
[
1
-
]
dip
nth
]
[
index-from
]
[
swapd
subseq
]
2tri
]
curry
[
drop
"UTF-8"
]
recover
;