I am trying to create a String from Array.But, there is condition to how it should be generated, as explained below.
NSArray *array=[NSArray arrayWithObjects:@"Hello",@"World",nil];
[array componentsJoinedByString:@","];
This will output: Hello,World.
But, if first Item is Empty,then is there way to receive the only second one.
- Hello , @”” => Hello
- @”” , World => World
- Hello , World => Hello,World
Another way to do this is to grab a mutable copy of the array and just remove non valid objects. Something like this perhaps: