add path-separator

db4
Doug Coleman 2008-03-26 14:57:35 -05:00
parent b2a430629b
commit 8939dd4971
1 changed files with 2 additions and 0 deletions

View File

@ -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 ;