Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you convert an NSUInteger into an NSString?

How do you convert an NSUInteger into an NSString? I've tried but my NSString returned 0 all the time.

NSUInteger NamesCategoriesNSArrayCount = [self.NamesCategoriesNSArray count];   NSLog(@"--- %d", NamesCategoriesNSArrayCount);   [NamesCategoriesNSArrayCountString setText:[NSString stringWithFormat:@"%d",    NamesCategoriesNSArrayCount]];   NSLog(@"=== %d", NamesCategoriesNSArrayCountString); 
like image 343
user563496 Avatar asked Mar 01 '11 14:03

user563496


1 Answers

When compiling with support for arm64, this won't generate a warning:

[NSString stringWithFormat:@"%lu", (unsigned long)myNSUInteger]; 
like image 64
Andreas Ley Avatar answered Nov 03 '22 09:11

Andreas Ley