CSV to HTML translation: Difference between revisions
Content added Content deleted
m (→{{header|Seed7}}: lang tag is html5 to show HTML source rather thn pre.) |
|||
Line 1,058: | Line 1,058: | ||
<lang haskell>--import Data.List.Split (splitOn) -- if the import is available |
<lang haskell>--import Data.List.Split (splitOn) -- if the import is available |
||
splitOn :: Char -> String -> [String] -- otherwise |
splitOn :: Char -> String -> [String] -- otherwise |
||
splitOn |
splitOn delim = foldr (\x rest -> |
||
if x == delim then "" : rest |
|||
splitOn delim (x:xs) |
|||
else (x:head rest):tail rest) [""] |
|||
| otherwise = (x:head rest):tail rest |
|||
where rest = splitOn delim xs |
|||
htmlEscape :: String -> String |
htmlEscape :: String -> String |