?
Solved

VB.NET equivalent of split() or explode()

Posted on 2007-03-24
4
Medium Priority
?
5,443 Views
Last Modified: 2012-05-05
What is the Visual Basic .NET equivalent of PHP's split() or explode() function?

More info: split() and explode() take a string and split it into array components based on another string.

Given a string named $a: "super;really;seriously"
And given command: split($a,";");
An array would be produced: $b[0]="super", $b[1]="really", $b[2]="seriously"
0
Comment
Question by:richdiesal
  • 3
4 Comments
 
LVL 67

Accepted Solution

by:
sirbounty earned 500 total points
ID: 18787013
split is the same in vb.net...

strData="super;really;seriously"
arrData=strData.Split(strData,";")

Now arrData(0) would equal "super", arrData(1) would equal "really", etc...
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 18787015
Perhaps the explode is the same as Join in vb.net? (joins the array back together...)
0
 
LVL 9

Author Comment

by:richdiesal
ID: 18787035
Aha!  I was treating it as a function instead of a method - and explode is the same as split.  Thanks!
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 18787039
:)
Glad I could be of assistance... (since I can only spell PHP - haha!)
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

These days socially coordinated efforts have turned into a critical requirement for enterprises.
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month13 days, 22 hours left to enroll

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question