The Trunk: Multilingual-pre.230.mcz

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

The Trunk: Multilingual-pre.230.mcz

Patrick Rein uploaded a new version of Multilingual to project The Trunk:

==================== Summary ====================

Name: Multilingual-pre.230
Author: pre
Time: 31 August 2017, 3:15:51.6494 pm
UUID: 739e6436-0d72-4048-a12a-93a0801c2872
Ancestors: Multilingual-pre.229, Multilingual-tonyg.218

Merges Multilingual-tonyg.218 which is part of a fix for Mantis #4665 and deals with the difference in counting at the public interface of streams and counting the steps in the underlying buffer.

=============== Diff against Multilingual-pre.229 ===============

Item was added:
+ ----- Method: MultiByteFileStream>>upToPosition: (in category 'accessing') -----
+ upToPosition: anInteger
+ "Answer a subcollection containing items starting from the current position and ending including the given position. Usefully different to #next: in that positions measure *bytes* from the file, where #next: wants to measure *characters*."
+ ^self collectionSpecies new: 1000 streamContents: [ :stream |
+ | ch |
+ [ (ch := self next) == nil or: [ position > anInteger ] ]
+ whileFalse: [ stream nextPut: ch ] ]!