Solved

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

Posted on 2007-03-24
4
5,260 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 125 total points
Comment Utility
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
Comment Utility
Perhaps the explode is the same as Join in vb.net? (joins the array back together...)
0
 
LVL 9

Author Comment

by:richdiesal
Comment Utility
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
Comment Utility
:)
Glad I could be of assistance... (since I can only spell PHP - haha!)
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now