'From Squeak3.9alpha of 4 July 2005 [latest update: #7035] on 30 June 2006 at 2:59:54 am'! "Change Set: Unicode-kwl Date: 30 June 2006 Author: Klaus D. Witzel < use only the new categories for isDigit, isLetter, isLowercase and isUppercase >"! !Unicode class methodsFor: 'character classification' stamp: 'kwl 6/30/2006 02:55'! isDigit: char | value | value := char charCode. value > (GeneralCategory size - 1) ifTrue: [^ false]. ^ (GeneralCategory at: value + 1) = Nd! ! !Unicode class methodsFor: 'character classification' stamp: 'kwl 6/30/2006 02:56'! isLetter: char | value codeCat | value := char charCode. value > (GeneralCategory size - 1) ifTrue: [^ false]. ^ (codeCat := GeneralCategory at: value + 1) >= Ll and: [codeCat <= Lu]! ! !Unicode class methodsFor: 'character classification' stamp: 'kwl 6/30/2006 02:57'! isLowercase: char | value | value := char charCode. value > (GeneralCategory size - 1) ifTrue: [^ false]. ^ (GeneralCategory at: value + 1) = Ll! ! !Unicode class methodsFor: 'character classification' stamp: 'kwl 6/30/2006 02:58'! isUppercase: char | value | value := char charCode. value > (GeneralCategory size - 1) ifTrue: [^ false]. ^ (GeneralCategory at: value + 1) = Lu! ! !Unicode class methodsFor: 'class initialization' stamp: 'kwl 6/30/2006 02:53'! initialize " Unicode initialize " (self classPool keys select: [:sym | sym size = 2 and: sym first isUppercase and: sym last isLowercase]) asSortedCollection inject: 1 into: [:index :sym | sym = #Cn ifTrue: [self classPool at: sym put: 0. index] ifFalse: [self classPool at: sym put: index. index + 1]]! !