Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quote configurable delimiter character, not just commas #102

Closed
DivineDominion opened this issue Jul 8, 2022 · 0 comments
Closed

Quote configurable delimiter character, not just commas #102

DivineDominion opened this issue Jul 8, 2022 · 0 comments

Comments

@DivineDominion
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant