Class Char Magnitude value Methods Char isChar ^ true ] Methods Char printString ^ '$', self asString ] Methods Char asString " make ourselves into a string " ^ ' ' copy; at: 1 put: self ] Methods Char asInteger ^ value ] Methods Char isAlphabetic ^ (self isLowercase) or: [ self isUppercase ] ] Methods Char isDigit ^ value between: $0 asInteger and: $9 asInteger ] Methods Char value: aValue " private - used for initialization " value <- aValue ] Methods Char isLowercase ^ value between: $a asInteger and: $z asInteger ] Methods Char < aValue " can only compare characters to characters " ^ aValue isChar ifTrue: [ value < aValue asInteger ] ifFalse: [ smalltalk error: 'char compared to nonchar'] ] Methods Char == aValue ^ aValue isChar ifTrue: [ value = aValue asInteger ] ifFalse: [ false ] ] Methods Char digitValue " return an integer representing our value " self isDigit ifTrue: [ ^ value - $0 asInteger ]. self isUppercase ifTrue: [ ^ value - $A asInteger + 10 ]. ^ smalltalk error: 'illegal conversion, char to digit' ] Methods Char isAlphaNumeric ^ (self isAlphabetic) or: [ self isDigit ] ] Methods Char isBlank ^ value = $ " blank char " ] Methods Char isUppercase ^ value between: $A asInteger and: $Z asInteger ]