diff --git a/core/io/files/files.factor b/core/io/files/files.factor index 60943be48c..48098e612d 100755 --- a/core/io/files/files.factor +++ b/core/io/files/files.factor @@ -45,6 +45,8 @@ HOOK: (file-appender) io-backend ( path -- stream ) ! Pathnames : path-separator? ( ch -- ? ) windows? "/\\" "/" ? member? ; +: path-separator ( -- string ) windows? "\\" "/" ? ; + : right-trim-separators ( str -- newstr ) [ path-separator? ] right-trim ;