|
-
Jul 26th, 2007, 09:19 AM
#1
Thread Starter
Addicted Member
[RESOLVED] C# equivalent to PHP implode()
I used the string.split method on a very large string and I need to put it back together. I've used PHP for a long time and with it you just simply use the implode function to do this. What would be the C# equivalent to this function?
-
Jul 26th, 2007, 09:29 AM
#2
Re: C# equivalent to PHP implode()
Hi there,
I'm not too familiar with PHP, but I believe you are looking for String.Join()
Code:
string[] str = { "Bob", "eats", "apples", "and", "bananas" };
MessageBox.Show(string.Join(" ", str));
Here is the documentation:
http://msdn2.microsoft.com/en-us/lib...in(vs.80).aspx
-
Jul 26th, 2007, 09:31 AM
#3
Thread Starter
Addicted Member
Re: C# equivalent to PHP implode()
That looks like what I've been searching for... It's always something simple.
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|