C# Tips: How to remove white-space characters inside a string?
2011-09-22 10:58
489 查看
The answer is very simple, just a line of code:
string outputString = Regex.Replace(inputString, @"\s", string.Empty);
相关文章推荐
- How to remove space or newline characters from a string?
- How To Mark Or Get The Highlighted String Inside UIWebView
- How to remove the duplicated value in a String array
- 【获取、高亮UIWebView中选择的文本】How To Mark Or Get The Highlighted String Inside UIWebView
- csharp:Learn how to post JSON string to generic Handler using jQuery in ASP.Net C#.
- Perl trim function to strip whitespace from a string
- C# Tips: How to tell if system is little endian or big endian?
- how to remove nil and blank string in an array in Ruby
- How to remove spaces of a string with regular expression
- LINQ to Entities 不识别方法“Boolean IsNullOrWhiteSpace(System.String)”
- Some tips about how to reverse Array with C#
- Tips on How To Operate Files in C#
- 如何把string解析为int?[C#] How to Parse a string to an int? [C#]
- [转]ConsumeContainerWhitespace property to remove blank space in SSRS 2008 report
- How do you remove the duplicate characters in a given string without using any additional buffer.
- C# How to Convert String to ASCII OR how to convert ASCII To String
- C#、.Net代码精简优化(空操作符(??)、as、string.IsNullOrEmpty() 、 string.IsNullOrWhiteSpace()、string.Equals()、System.IO.Path 的用法)
- char * strtrim(char* s ) to remove any space character(such as '\t' , ' ' ...) in a string
- How to remove null value in json string
- Different ways how to escape an XML string in C#