string cleanedString = System.Text.RegularExpressions.Regex.Replace(dirtyString,@"\s+"," ");
More Related Contents:
- Efficient way to remove ALL whitespace from String?
- Fastest way to remove white spaces in string
- c# Fastest way to remove extra white spaces
- What is the difference between String and string in C#?
- Can I convert a C# string value to an escaped string literal?
- What is the difference between String and string in C#?
- Get string between two strings in a string
- String output: format or concat in C#?
- Differences in string compare methods in C#
- How can I split a string with a string delimiter? [duplicate]
- Comparing two strings, ignoring case in C# [duplicate]
- string = string + int: What’s behind the scenes?
- Check if a value is in an array (C#)
- Checking if a string array contains a value, and if so, getting its position
- How to know the size of the string in bytes?
- IEnumerable to string [duplicate]
- Format a string into columns
- String to Binary in C#
- ComboBox.SelectedText doesn’t give me the SelectedText
- Check if a string is a palindrome
- Instantiate a class from its textual name
- C# how convert large HEX string to binary
- Why does .ToString() on a null string cause a null error, when .ToString() works fine on a nullable int with null value?
- Converting String To Float in C#
- Does String.GetHashCode consider the full string or only part of it?
- Detecting if a string is all CAPS
- Replace non-numeric with empty string
- How can I check if a string contains a character in C#?
- Parsing through Arabic / RTL text from left to right
- How to get the first five character of a String