regexThu, 02 Mar 2023

C# How to remove all white space and space symbols from the beginning or end of a string?

Regex.Replace(str, "\\s+", "");

Want to kickstart your project?Use the new AI Studio to create your code