📜  如何将字符串拆分为忽略空格数的列表c#代码示例

📅  最后修改于: 2022-03-11 14:48:57.295000             🧑  作者: Mango

代码示例1
using System;

var text = "There  is an old  hawk in the sky";

var words = text.Split(' ', StringSplitOptions.RemoveEmptyEntries);
Array.ForEach(words, Console.WriteLine);