Linux world
Linux world

Reputation: 3768

how to compare 2 strings

i have two strings initialised with using nsstring *name1,*name2... how to compare these

Upvotes: 2

Views: 4726

Answers (1)

James
James

Reputation: 5820

if([name1 isEqualToString:name2]){
    NSLog("These are the same name");
}

The best place for API features like this is the Apple documentation

Upvotes: 8

Related Questions