From 0e8392bbeb57be1111d3cb58efe74b65a7451dbe Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Wed, 30 Jul 2008 00:22:01 +0200 Subject: MLKCharacter: Implement -isEqual:. --- MLKCharacter.h | 2 ++ MLKCharacter.m | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/MLKCharacter.h b/MLKCharacter.h index 220ab18..960a8d8 100644 --- a/MLKCharacter.h +++ b/MLKCharacter.h @@ -40,4 +40,6 @@ +(unichar) uppercaseCharForChar:(unichar)ch; +(unichar) lowercaseCharForChar:(unichar)ch; + +-(BOOL) isEqual:(id)thing; @end diff --git a/MLKCharacter.m b/MLKCharacter.m index 13679bd..a54608a 100644 --- a/MLKCharacter.m +++ b/MLKCharacter.m @@ -68,4 +68,10 @@ { return [[MLKCharacter characterWithUnichar:ch] lowercaseChar]; } + +-(BOOL) isEqual:(id)thing +{ + return ([thing isKindOfClass:[MLKCharacter class]] + && ((MLKCharacter *)thing)->unichar == self->unichar); +} @end -- cgit v1.2.3