您的位置:首页 > 其它

按照指定的字符串分割字符串形成字符数组

2012-02-22 09:36 483 查看
using System;

namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
string str = "ab¥,cd,ef|)12*34";
string[] strs = str.Split(new string[] { "¥,", "|)" }, StringSplitOptions.RemoveEmptyEntries);// 按照指定的字符串分割字符串形成字符数组

foreach(string s in strs)
{
Console.WriteLine(s);
}

Console.ReadKey();
}
}

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: