Solved

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

Posted on 2007-03-24
4
5,337 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 67

Accepted Solution

by:
sirbounty earned 125 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

739 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