【发布时间】:2021-05-20 15:09:19
【问题描述】:
我想知道如何在 C# 中表示空白字符。我找到了空字符串表示string.Empty。有没有类似的代表空白字符的东西?
我想做这样的事情:
test.ToLower().Split(string.Whitespace)
//test.ToLower().Split(Char.Whitespace)
【问题讨论】:
-
不就是一个空格吗? (或 ascii 等价物?)
-
空白是一组字符。
-
一个空白字符不仅仅是一个空格,根据msdn.microsoft.com/en-us/library/e9a023cx.aspx
Space, tab, linefeed, carriage-return, formfeed, vertical-tab, and newline characters are called "white-space characters" because they serve the same purpose as the spaces between words and lines on a printed page — they make reading easier -
' '还有 10 个...
标签: c#