Re: Newbie Q
Re: Newbie Q
- Subject: Re: Newbie Q
- From: Kiel Gillard <email@hidden>
- Date: Sat, 17 Sep 2005 20:18:32 +1000
Hi Aaron,
Check out NSArray's componentsJoinedByString instance method.
For example:
NSArray * words = [NSArray arrayWithObjects:@"Aaron", "Wallis", nil];
NSString * concatenation = [words componentsJoinedByString:@" "];
You could pass [NSString string] or @"" to the
componentsJoinedByString: method if you don't want the descriptions
of each object in the array to be seperated by a string.
As the documentation for this method says, each element of the
receiver must respond to the description method. You could override
this method to produce the results you might be looking for.
Hope this helps,
Kiel :-)
"Put your hand on a hot stove for a minute, and it seems like an
hour. Sit with a pretty girl for an hour, and it seems like a minute.
THAT'S relativity."
Albert Einstein
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden