I really need to loop through an array, then if array[iterator] != 0 {
I need to append the array[iterator] value, a Long to a nsstring
I am aware of
int G = 23456;
NSString *B = [NSString stringWithFormat:@"lolol %d", G];
but I dont know how to append to a string.
Thank You!
As NSGod notes, there are a couple methods on
NSStringthat can concatenate and return strings. However, if you’re planning on appending many times, you probably want to use NSMutableString, which is optimized for such cases.For example (based on the problem you’re trying to solve):