ok..so i’m reading from an sqlite db data into a string…it works..but when the data is null there is a problem
NSLog(@"%@",string);
if(string!=NULL && [string length]!=0){ do stuff }
note that the NSLog output is <null> not NULL or nil and i think here is the problem…i’m trying to check for NULL when the string is <null>
does that make sence?
in any case…is there any way to check if the string is <null>? or is there a better way to check for this problem?
<null>is what thedescriptionmethod onNSNullprints out. You should also check forstring != [NSNull null].(
NSNullis a placeholder singleton for collections, where actualnilvalues aren’t allowed.)