CSV to HTML translation: Difference between revisions

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