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

Portabilityportable
Stabilityexperimental
Maintainerkeithshep@gmail.com
Safe HaskellSafe-Inferred

Database.TxtSushi.FlatFile

Description

Functions for reading/writing flat files

Synopsis

Documentation

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.

Constructors

Format String String [String] 

Instances

doubleQuote :: Format -> StringSource

get a quote escape sequence for the given Format