Hi,
can we have a class-side configuration for STON line ending?
Atm if I want to output with LF instead of CR (which is always),
then I have to always do this
String streamContents: [ :stream |
(STON writer on: stream)
prettyPrint: true;
newLine: String lf;
nextPut: data
].
I would be much happier if at least I could do this
STON lineEnding: String lf
(I could put the above in a StartupScript)
And then just use regular STON toStringPretty: data.
And I would be even happier if
STON class>>lineEnding
^ String lf
or
STON class>>lineEnding
^ OSPlatform current isWindows
ifTrue: [ String crlf ]
ifFalse: [ String lf ]
(Although always using LF by default might be preferable.)
To summarize, it would be great if we could:
* switch STON to LF _by default_
* allow users to easily switch to CR/CRLF if they need
Thanks,
Peter