textToSet=“(5/5 00:00, 131.85)”
method1:
string[] strArray = textToSet.Split(',');//拆分后strArray.count=2
method2:
string[] condition = {","};
string[] str = textToSet.Split(condition, StringSplitOptions.None);//拆分后strArray.count=2
method3:
string[] strArray2 = textToSet.Split(new char[3] {'(', ',', ')'});//拆分后strArray.count=4
c# unity3d 三种split切片字符串方式
最新推荐文章于 2022-09-21 15:46:39 发布