|
C# code for doing a simple split. There's probably a simpler way to do this but I haven't discovered it yet. using System.Text.RegularExpressions; public string[] split(string sData, string sToken) back to code page by wiseleyb@yahoo.com Comments:From GeekDaddy [24.145.159.179] - 2/1/05 1:28 AM Use Regex.Split() instead of String.Split()
From admin [4.5.93.179] - 7/25/04 5:31 PM You need a function if you want to split on anything more than one character
From meebey [213.39.173.26] - 7/25/04 5:13 PM string foo = "hello world, here I am";
string[] splitted = foo.Split(new char[] {' '}); foreach(string part in splitted) { Console.WriteLine(part); } why do you need that split function? C# can do it for you... Last Modified 8/20/03 4:50 AM | Hide Tools |