[Q][RFI] Where ends a line of ASCII text ?
Lic. Edgar J. De Cleene
edgardec2001 at yahoo.com.ar
Sun Mar 13 10:50:17 UTC 2005
We have
nextLine
"Answer next line (may be empty), or nil if at end"
self atEnd ifTrue: [^nil].
^self upTo: Character cr
In PositionableStream, but not all OS agree what a line ends in cr
nextLineLf
| nextLine |
nextLine := self upToAll: String lf.
^nextLine
In SocketStream
The consensus is not change or add methods to base classes as
PositionableStream , but also seems silly add nextLineLf or nextLineCrLf
each time we need
So what to do ? I proposing have #cleverNextLine.
Edgar
More information about the Squeak-dev
mailing list
|