[squeak-dev] The Inbox: Multilingual-ul.195.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Feb 10 19:03:39 UTC 2014


A new version of Multilingual was added to project The Inbox:
http://source.squeak.org/inbox/Multilingual-ul.195.mcz

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

Name: Multilingual-ul.195
Author: ul
Time: 10 February 2014, 6:46:46.381 pm
UUID: 3efb072c-56bf-433a-8edf-a2af9cd301ba
Ancestors: Multilingual-fbs.194

Introduced EncodedCharSet class>>isAlphaNumeric: which can be used to decide if a character is a letter or a digit. Unicode class has an optimized version.

=============== Diff against Multilingual-fbs.194 ===============

Item was added:
+ ----- Method: EncodedCharSet class>>isAlphaNumeric: (in category 'character classification') -----
+ isAlphaNumeric: aCharacter
+ 	
+ 	^(self isLetter: aCharacter) or: [
+ 		self isDigit: aCharacter ]!

Item was added:
+ ----- Method: Unicode class>>isAlphaNumeric: (in category 'character classification') -----
+ isAlphaNumeric: aCharacter
+ 	" use a single lookup for both letters and digits "
+ 
+ 	| value codeCat |
+ 	value := aCharacter charCode.
+ 	GeneralCategory size - 1 < value ifTrue: [ ^false ].
+ 	^(codeCat := GeneralCategory at: value + 1) >= Ll and: [
+ 		codeCat <= Lu or: [ codeCat = Nd ] ]!



More information about the Squeak-dev mailing list