swiftcsv/SwiftCSV

Quote configurable delimiter character, not just commas

DivineDominion opened this issue · 0 comments

SwiftCSV/SwiftCSV/CSV.swift

Lines 111 to 117 in 048a1d3

func enquoteContentsIfNeeded(cell: String) -> String {
// Add quotes if value contains a comma
if cell.contains(",") {
return "\"\(cell)\""
}
return cell
}

The current implementation of the enquote helper is still hard-coded to ",", but we now support different delimiters.