]> gitweb @ CieloNegro.org - Rakka.git/blobdiff - Rakka/Utils.hs
Implemented the outline command
[Rakka.git] / Rakka / Utils.hs
index e411694477f9c295c94583d2e04b6bcb0309f91a..9f2873c9ae328d626d9679b2ac0c777750c1e50e 100644 (file)
@@ -4,6 +4,7 @@ module Rakka.Utils
     , maybeA
     , deleteIfEmpty
     , formatW3CDateTime
+    , chomp
     )
     where
 
@@ -71,4 +72,8 @@ formatW3CDateTime time
             
       show2 :: Int -> String
       show2 n | n < 10    = '0':(show n)
-              | otherwise = show n
\ No newline at end of file
+              | otherwise = show n
+
+
+chomp :: String -> String
+chomp = reverse . snd . break (/= '\n') . reverse