objective c - NSString length not correct when checked? -


i have problem function :

- (bool) test : (nsstring *) chaine {     nslog(@"%i",[chaine length]);     if([chaine length] == 19) nslog(@"test"); } 

i correctly have 19 in log, not "test". know what's wrong ?

thanks lot

i tried this

- (void)testfunction{ nsstring * astrfunc= @"stackoverflow";  nslog(@"%d",[astrfunc length]);  nslog(@"%@",[astrfunc length]==13?@"test right":@"test not right"); 

}


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -