avro-piper-1.0.1: src/Format.hs
module Format
where
unescape :: String -> String
unescape = foldr step ""
where
step '\\' (c:cs) = case c of
'n' -> '\n':cs
'r' -> '\r':cs
't' -> '\t':cs
_ -> c:cs
step c cs = c:cs