iphone - How to search NSArray in Objective C -


hi friends, have array consists of many names. want search names starting character "c". how can search array.

nsstring* firstletter;  for(nsstring* currentstring in yourarray) {      firstletter = [nsstring stringwithformat:@"%c", [currentstring characteratindex:0]];      if([firstletter isequaltostring:@"c"])      {           // name ok      }      else      {          // name wrong      } }  

Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -