Re: [Pharo-users] NeoCSVWriter automatic quotes

2016-12-05 Thread Peter Uhnak
On Fri, Nov 25, 2016 at 09:38:42PM +0100, Sven Van Caekenberghe wrote: > Peter, > > > On 25 Nov 2016, at 19:35, 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 (

Re: [Pharo-users] NeoCSVWriter automatic quotes

2016-11-25 Thread Sven Van Caekenberghe
Peter, > On 25 Nov 2016, at 19:35, 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 Why e

Re: [Pharo-users] NeoCSVWriter automatic quotes

2016-11-25 Thread Peter Uhnak
So basically something like this, ``` NeoCSVWriter>>writeMaybeQuotedField: object | string | string := object asString. string := string copyReplaceAll: '"' with: '""'. ((string includes: $") or: [ string includes: separator ]) ifTrue: [ writeStream

[Pharo-users] NeoCSVWriter automatic quotes

2016-11-25 Thread Peter Uhnak
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