Answers for "ignore white space string c# from last"

C#
2

remove whitespace between string c#

string str = "C Sharp";
str = Regex.Replace(str, @"\s", "");
Posted by: Guest on September-17-2020
0

how to remove white spaces from string in c#

using System.Linq;

// ...

string example = "   Hi there!    ";
string trimmed = String.Concat(example.Where(c => !Char.IsWhiteSpace(c)));
// Result: "Hithere!"
Posted by: Guest on November-23-2020

Code answers related to "ignore white space string c# from last"

C# Answers by Framework

Browse Popular Code Answers by Language