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
Post a Comment