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

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -