real-dice-0.1.0.5: Random number generation based on physical media touched by humans
Safe HaskellSafe-Inferred
LanguageHaskell2010

RealDice.Convert.CSV

Description

This module provides functions to convert between lists of integers and strings suitable for use in CSV files

Synopsis

Documentation

intsToCSV :: [Int] -> String Source #

Remove the square brackets `[]` from the string representation of a list so it can be used as a CSV string

Examples

Expand
>>> intsToCSV [1,2,3]
"1,2,3"

csvToInts :: String -> [Int] Source #

Add square brackets `[]` to a CSV string of integers and make it into a list

Examples

Expand
>>> csvToInts "1,2,3"
[1,2,3]