summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <matthias@benkard.de>2008-07-30 00:22:01 +0200
committerMatthias Andreas Benkard <matthias@benkard.de>2008-07-30 00:22:01 +0200
commit0e8392bbeb57be1111d3cb58efe74b65a7451dbe (patch)
treef14443d5f0cbabdd3d02895825bdba7906ce09a6
parentd30b5e487ccbd85deb385a19e12233a9ef9008e2 (diff)
MLKCharacter: Implement -isEqual:.
-rw-r--r--MLKCharacter.h2
-rw-r--r--MLKCharacter.m6
2 files changed, 8 insertions, 0 deletions
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