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

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

PostgreSQL 9.x - pg_read_binary_file & inserting files into bytea -

asp.net - call stack missing info on mono with apache and mod_mono -