Nov. 25, 2016
6:44 p.m.
So basically something like this, ``` NeoCSVWriter>>writeMaybeQuotedField: object | string | string := object asString. string := string copyReplaceAll: '"' with: '""'. ((string includes: $") or: [ string includes: separator ]) ifTrue: [ writeStream nextPut: $"; nextPutAll: string; nextPut: $" ] ifFalse: [ writeStream nextPutAll: string ] ``` Peter On Fri, Nov 25, 2016 at 07:35:29PM +0100, Peter Uhnak wrote:
Hi,
is it/would it be possible to modify NeoCSVWriter to add quotes only where necessary? So only if the written value contains the separator (is there any other case that would require the quotes?).
Thanks, Peter