方法如下,使用正则表达式:

 string abc = "3  45  55  55  676 11";

 

 string str = System.Text.RegularExpressions.Regex.Replace(abc, @"\s+", ",");

 string[] aa =str.Split(',');

 

也可以直接分割:

 string[] aa = System.Text.RegularExpressions.Regex.Split(abc, @"\s+");

from: http://hi.baidu.com/zhenzhounew/item/87497ee3be1277c3baf37df8

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-07-27
  • 2021-11-12
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-07
  • 2021-10-15
  • 2022-12-23
相关资源
相似解决方案