]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/io/encodings/detect/detect.factor
factor: refactor subseq-start
[factor.git] / extra / io / encodings / detect / detect.factor
index a111c2109fa6293be31206beb86e712da92ebe9e..6c31362da97a3a3c90450fd7bebce3955fcf0e4f 100644 (file)
@@ -17,7 +17,7 @@ default-encoding [ latin1 ] initialize
 
 : prolog-encoding ( string -- iana-encoding )
     '[
-        _ "encoding=" over subseq-start
+        _ dup "encoding=" subsequence-starts
         10 + swap [ [ 1 - ] dip nth ] [ index-from ] [ swapd subseq ] 2tri
     ] [ drop "UTF-8" ] recover ;