ios - Objective-c: Making NSArray all lowercased -


i having strange problem when tryin catch data on plist.. so, here plist plist

so okay, getting data fine, used code know data

nsstring *path = [[nsbundle mainbundle] pathforresource:@"kurdiebg" oftype:@"plist"]; nsarray *plistdata = [nsarray arraywithcontentsoffile:path];  nspredicate *filter = [nspredicate predicatewithformat:@"english = %@", self.searchqwery.text]; nsarray *filtered = [plistdata filteredarrayusingpredicate:filter];    nslog(@"found matches: %@ : %@", filtered,[filtered valueforkey:@"kurdi"]);  if (filtered.count>0) {     nsdictionary *dic  = filtered[0];     self.ss.text = dic[@"kurdi"]; } 

but here strange part-- when try search abbey (lowercased)it returns right result, problem has twenty 2 thousand records they're not lowercased, abbey

okay, when make first a capital, returns nothing abbey

thanks visiting

you can case insensitive search adding [c]. try this.

nspredicate *filter = [nspredicate predicatewithformat:@"english ==[c] %@", self.searchqwery.text]; 

Comments

Popular posts from this blog

sql - Time in datatime field -

javascript - How to split the success output from an Ajax post? -

java - sharing object across different classes -