txt-sushi-0.5.0: The SQL link in your *NIX chain



The FlatFile module is for reading misc. FlatFile formats like CSV or tab delimited



maxTableColumnWidths :: [[String]] -> [Int]Source

for a table, calculate the max width in characters for each column

formatTable :: Format -> [[String]] -> StringSource

Format the given table (the 2D String array) into a flat-file string using the given Format

parseTable :: Format -> String -> [[String]]Source

Parse the given text using the given flat file Format. The result is a list of list of strings. The strings are fields and the string lists are rows

data Format Source

Format allows you to specify different flat-file formats so that you can use parseTable for CSV, tab-delimited etc.


Format String String [String] 


doubleQuote :: Format -> StringSource

get a quote escape sequence for the given Format