Suggestion of String == String
Paul Dufresne
dufrp at hotmail.com
Wed Jul 2 17:49:09 PDT 2003
Well, is the following ok to commit to string.slate:
s1@(String traits) == s2@(String traits)
"Compares two string character by character" [
(s1 size == s2 size) ifFalse: [ ^ False ].
s1 doWithIndex: [| :each :index | each == (s2 at: index) ifFalse: [ ^
False] ].
True
].
I tested it.
But somehow, I was not sure == is ok, or I should call it isEqualTo: ?
_________________________________________________________________
MSN Search, le moteur de recherche qui pense comme vous !
http://fr.ca.search.msn.com/
More information about the Slate
mailing list