X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=Rakka%2FUtils.hs;h=9f2873c9ae328d626d9679b2ac0c777750c1e50e;hb=3c5211253dc61c31196a47486c538b64c32d8c5e;hp=e411694477f9c295c94583d2e04b6bcb0309f91a;hpb=b3c3f333cd48bc74eb33f0f21d56a9d1bc65e0ea;p=Rakka.git diff --git a/Rakka/Utils.hs b/Rakka/Utils.hs index e411694..9f2873c 100644 --- a/Rakka/Utils.hs +++ b/Rakka/Utils.hs @@ -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