HI friends, I have an array consists of many names. I want to search the names starting from the character "c". How can I search the array.
+2
A:
NSString* firstLetter;
for(NSString* currentString in yourArray)
{
firstLetter = [NSString stringWithFormat:@"%d", [currentString characterAtIndex:0]];
if([firstLetter isEqualToString:@"c"])
{
// NAME OK
}
else
{
// NAME WRONG
}
}
MathieuF
2010-10-07 07:45:19
@MathieuF: Thanks Bro :-)
Harsh
2010-10-07 10:15:24