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 (
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
So basically something like this,
```
NeoCSVWriter>>writeMaybeQuotedField: object
| string |
string := object asString.
string := string copyReplaceAll: '"' with: '""'.
((string includes: $") or: [ string includes: separator ])
ifTrue: [ writeStream
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