Question

I wanted to compare two strings using - (BOOL)isEqualToString:(NSString *)aString These strings are objects from a dictionary using -(id)objectForKey:(id)aKey containing numerical characters.

When I check the classes of these strings using [object class], no matter how I casted them to be NSString *, it keeps showing that they are NSCFDecimal number, requiring to be compared using ==. If I wanted to use isEqualToString on them, it throws error.

Can anyone explain why this is happening?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top