As of VA Smalltalk 9.1, a stream auto-detects the line delimiter when using the nextLine method. Prior to this behavior, the stream would use the platform line delimiter which made it difficult to create multiline string content on one platform that could be seamlessly read on another with
nextLine. By default, a stream continues to use the platform file system's line delimiter for the stream’s
cr operation.
A string representing the current line delimiter can be obtained by sending the lineDelimiter message to a file stream instance and can be changed to an arbitrary string by sending the
lineDelimiter: message. This makes it possible to enforce a specific line delimiter regardless of the running platform. For example, the desired behavior might be, for certain socket protocols to write out the Windows line delimiter default,
CrLf, even when the application is running on Linux.