C# split分割字符串
标签:字符 ESS using char har ring tostring expr write
string str="0011001100110011";
string[] str001 = str.Split(new string[]{"00"}, StringSplitOptions.XX);
string[] str002 = str.Split(new char[]{‘0‘, ‘0‘}, StringSplitOptions.XXX);
============
另外一种。需要引用。调用正则
using System.Text.RegularExpressions;
string[] sArray=Regex.Split(str,"00",RegexOptions.IgnoreCase);
foreach (string i in sArray) Response.Write(i.ToString());C# split分割字符串
标签:字符 ESS using char har ring tostring expr write
原文地址:https://www.cnblogs.com/iseaside/p/9545401.html
评论