Connecting Tech Pros Worldwide Forums | Help | Site Map

explode() equivalent in .net

the friendly display name
Guest
 
Posts: n/a
#1: Nov 22 '05
Hello,

In PHP there is the explode() function, it splits a string and returns an
array consistent of the string parts. The string is split this way:

$pizza = "piece1;piece2;piece3;piece4;piece5;piece6";
$pieces = explode(";", $pizza);
echo $pieces[0]; // piece1
echo $pieces[1]; // piece2

In the above example, the semicolon is declared as separator, the function
splits the string when it encounters it.

Full tutorial:
http://www.php.net/manual/en/function.explode.php


So, my question is very simple: Is there a method in .net, that does similar?

Closed Thread