Breaking News
Home / iOS / ObjectiveC / How to do Case Insensitive comparison in Objective C?

How to do Case Insensitive comparison in Objective C?

Answer

if( [@”test str” caseInsensitiveCompare:@”Test Str”] == NSOrderedSame )

// same, case could be different

}

else

{

// different chars

}

[pb_builder]

Check Also

Singleton Example in Objective C?

Solution static MyManager *sharedManager = nil; +(MyManager*) sharedManager {         if (sharedManager == nil)         …

Advertisment ad adsense adlogger