-----------------------------------------------------------------------------
--- $Id: DriverUtil.hs,v 1.7 2000/11/16 11:39:37 simonmar Exp $
+-- $Id: DriverUtil.hs,v 1.8 2000/11/17 13:33:17 sewardj Exp $
--
-- Utils for the driver
--
stripDot ('.':xs) = xs
stripDot xs = xs
+-- "foo/bar/xyzzy.ext" -> ("foo/bar", "xyzzy", ".ext")
+splitFilename3 :: String -> (String,String,String)
+splitFilename3 str
+ = let dir = getdir str
+ (name, ext) = splitFilename (drop (length dir) str)
+ in (dir, name, ext)
+
remove_suffix :: Char -> String -> String
remove_suffix c s
| null pre = reverse suf