Answers for "how to split string into a list ignoring number of spaces c#"

C#
0

how to split string into a list ignoring number of spaces c#

using System;

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

var words = text.Split(' ', StringSplitOptions.RemoveEmptyEntries);
Array.ForEach(words, Console.WriteLine);
Posted by: Guest on June-25-2021

Code answers related to "how to split string into a list ignoring number of spaces c#"

C# Answers by Framework

Browse Popular Code Answers by Language