]> gitweb.factorcode.org Git - factor.git/blobdiff - core/io/pathnames/pathnames.factor
sequences: add index-of-last
[factor.git] / core / io / pathnames / pathnames.factor
index 64bc3f762a73304dfb5a59bcc8d47550560e742a..d181b5c97a4ede5bf9d0b585cc38676e4537270f 100644 (file)
@@ -17,7 +17,7 @@ SYMBOL: current-directory
     [ path-separator? ] trim-head ;
 
 : last-path-separator ( path -- n ? )
-    [ length 1 - ] keep [ path-separator? ] find-last-from ;
+    index-of-last [ path-separator? ] find-last-from ;
 
 HOOK: root-directory? io-backend ( path -- ? )