I\'m looking for a method of turning a NSMutableArray into a string. Is there anything on a par with this Ruby array method?
>> array1 = [1, 2, 3] >
The method you are looking for is componentsJoinedByString.
componentsJoinedByString
NSArray *a = [NSArray arrayWithObjects:@"1", @"2", @"3", nil];//returns a pointer to NSArray NSString *b = [a componentsJoinedByString:@","];//returns a pointer to NSString NSLog(@"%@", b); // Will output 1,2,3