[squeak-dev] The Trunk: Collections-tpr.539.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Oct 8 21:48:57 UTC 2013


tim Rowledge uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-tpr.539.mcz

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

Name: Collections-tpr.539
Author: tpr
Time: 8 October 2013, 2:48:12.552 pm
UUID: e33fd51f-59a0-41ab-bbee-08a8a969f31a
Ancestors: Collections-cmm.538

Strings need to understand how to delegate character scanning to the next stage of the process

=============== Diff against Collections-cmm.538 ===============

Item was added:
+ ----- Method: ByteString>>scanCharactersFrom:to:with:rightX:font: (in category 'character scanning') -----
+ scanCharactersFrom: startIndex to: stopIndex with: aCharacterScanner rightX: rightX  font: aFont
+ 	"NB: strongly consider getting almost all these parameters from the scanner"
+ 	"Since I'm a byte char string, I know that we have to scan single-byte characters and don't have to handle encodings etc"
+ 	startIndex > stopIndex
+ 		ifTrue: [^aCharacterScanner handleEndOfRunAt: stopIndex].
+ 	^aFont scanByteCharactersFrom: startIndex to: stopIndex in: self with: aCharacterScanner rightX: rightX!

Item was added:
+ ----- Method: WideString>>scanCharactersFrom:to:with:rightX:font: (in category 'character scanning') -----
+ scanCharactersFrom: startIndex to: stopIndex with: aCharacterScanner rightX: rightX  font: aFont
+ 	"NB: strongly consider getting almost all these parameters from the scanner"
+ 	"Since I'm a wide char string, I know that we have to scan multi-byte characters and handle encodings etc"
+ 	| charSet |
+ 	startIndex > stopIndex
+ 		ifTrue: [^aCharacterScanner handleEndOfRunAt: stopIndex].
+ 	charSet := self encodedCharSetAt: startIndex.
+ 	^charSet scanMultibyteCharactersFrom: startIndex to: stopIndex in: self with: aCharacterScanner rightX: rightX font: aFont	!



More information about the Squeak-dev mailing list