Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在文本出现之前替换一行中的所有空格,例如我有以下文本:
@" Hello\n world"
我希望它看起来像这样:
@"Hello\nworld"
你怎么能为每一行做到这一点?
您需要从字符串中修剪空格。检查这个线程。有一个解决方案。