Im trying to print out an NSSet on a single line, comma separation but no trailing comma or space. how can i do this?
i know that this works for an array:
NSMutableString *outputStringArray = [[NSMutableString alloc] init];
NSMutableArray *myArray = [[NSMutableArray alloc] initWithCapacity:10];
for (int k = 0; k < [myArray count]; k++) {
[outputStringArray appendFormat:@"%@, ", [myArray objectAtIndex:k]];
}
NSLog(@"%@", [outputStringArray substringToIndex:[outputStringArray length] - 2]);
but since sets don't have indexing i cant do this.
thanks