--- a/CharacterArray.st Tue May 15 20:11:49 2012 +0200
+++ b/CharacterArray.st Tue May 15 21:35:04 2012 +0200
@@ -11,7 +11,7 @@
"
"{ Package: 'stx:libbasic' }"
-ByteArray variableByteSubclass:#CharacterArray
+UninterpretedBytes variableByteSubclass:#CharacterArray
instanceVariableNames:''
classVariableNames:'PreviousMatch DecoderTables EncoderTables DecodingFailedSignal
EncodingFailedSignal LastString LastShiftTable'
@@ -1811,18 +1811,16 @@
therefore 'foo' = 'Foo' will return false.
Since this is incompatible to ST-80 (at least, V2.x) , this may change."
- |mySize "{ Class: SmallInteger }"
- otherSize |
+ |mySize "{ Class: SmallInteger }"|
(aString isString or:[aString species == self species]) ifFalse:[
- ^ false
+ ^ false
].
mySize := self size.
- otherSize := aString size.
- mySize == otherSize ifFalse:[^ false].
+ mySize ~~ (aString size) ifTrue:[^ false].
1 to:mySize do:[:index |
- (self at:index) = (aString at:index) ifFalse:[^ false].
+ (self at:index) = (aString at:index) ifFalse:[^ false].
].
^ true
@@ -1993,21 +1991,20 @@
self reverseDo:[:char |
"/ Sorry, stc cannot compile this (as of 10.9.2007)
"/ h := (h bitShift:4) + char asciiValue.
- h := (h bitShift:4).
- h:= h + char codePoint.
- h := h bitAnd:16rFFFFFFFF.
- g := (h bitAnd: 16rF0000000).
- g ~~ 0 ifTrue:[
- h := h bitXor:(g bitShift:-24).
- h := h bitXor:g.
- ].
+ h := (h bitShift:4).
+ h:= h + char codePoint.
+ h := h bitAnd:16rFFFFFFFF.
+ g := (h bitAnd: 16rF0000000).
+ g ~~ 0 ifTrue:[
+ h := h bitXor:(g bitShift:-24).
+ h := h bitXor:g.
+ ].
].
"/
"/ multiply by large prime to spread values
"/ This speeds up Set and Dictionary by a factor of 10!!
"/
- h := h * 31415821.
- h := h bitAnd:16r3fffffff.
+ h := h times:31415821.
^ h
"
@@ -6080,11 +6077,11 @@
!CharacterArray class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.471 2012-04-24 14:56:08 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.472 2012-05-15 19:35:04 stefan Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.471 2012-04-24 14:56:08 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.472 2012-05-15 19:35:04 stefan Exp $'
! !
CharacterArray initialize!