--- a/CharacterArray.st Mon Apr 12 13:40:47 2004 +0200
+++ b/CharacterArray.st Mon Apr 12 18:14:30 2004 +0200
@@ -1477,23 +1477,11 @@
1 to:n do:[:index |
c1 := self at:index.
c2 := aString at:index.
- c1 < c2 ifTrue:[^ true].
- c1 > c2 ifTrue:[^ false].
+ (c1 == c2 or:[c1 = c2]) ifFalse:[^ c1 < c2].
].
^ mySize < otherSize
!
-<= something
- "Compare the receiver with the argument and return true if the
- receiver is less than or equal to the argument. Otherwise return false.
- This comparison is based on the elements ascii code -
- i.e. upper/lowercase & national characters are NOT treated specially."
-
- ^ (self > something) not
-
- "Modified: 22.4.1996 / 15:54:56 / cg"
-!
-
= aString
"Compare the receiver with the argument and return true if the
receiver is equal to the argument. Otherwise return false.
@@ -1547,26 +1535,13 @@
1 to:n do:[:index |
c1 := self at:index.
c2 := aString at:index.
- c1 > c2 ifTrue:[^ true].
- c1 < c2 ifTrue:[^ false].
+ (c1 == c2 or:[c1 = c2]) ifFalse:[^ c1 > c2].
].
^ mySize > otherSize
"Modified: 22.4.1996 / 15:55:00 / cg"
!
->= something
- "Compare the receiver with the argument and return true if the
- receiver is greater than or equal to the argument.
- Otherwise return false.
- This comparison is based on the elements ascii code -
- i.e. upper/lowercase & national characters are NOT treated specially."
-
- ^ (something > self) not
-
- "Modified: 22.4.1996 / 15:55:03 / cg"
-!
-
compareCaselessWith:aString
"Compare the receiver against the argument, ignoreing case.
Return 1 if the receiver is greater, 0 if equal and -1 if less than the argument.
@@ -4963,7 +4938,7 @@
!CharacterArray class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.300 2004-04-06 16:36:31 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/CharacterArray.st,v 1.301 2004-04-12 16:14:30 stefan Exp $'
! !
CharacterArray initialize!