swiftcsv / SwiftCSV

CSV parser for Swift
MIT License
947 stars 190 forks source link

#95 ignore white spaces before and after quotes/fields/values #96

Closed ondrej-kvasnovsky closed 3 years ago

ondrej-kvasnovsky commented 3 years ago

Fixes #95

ondrej-kvasnovsky commented 3 years ago

Looks good so far, thanks for adding the test case and providing a fix!

Would be great if you could add unit tests for other whitespace characters that should be skipped, too. Tabs come to mind; more exotic spaces like the non-breaking space (⌥+space on some keyboard layouts) would be optional "stretch goals" :)

Ok ok. Added more test data (using https://developer.apple.com/documentation/swift/character/3127019-iswhitespace). That that is pretty much the intent of this PR.

DivineDominion commented 3 years ago

We've invited you to join the SwiftCSV GitHub organization – no pressure to accept! If you'd like more information on what that means, check out our contributor guidelines.