我有一个字符串。
string strToProcess = "fkdfdsfdflkdkfk@dfsdfjk72388389@kdkfkdfkkl@jkdjkfjd@jjjk@";
我需要在字符串中每次出现“@”符号后添加一个换行符。
我的输出应该是这样的
fkdfdsfdflkdkfk@ dfsdfjk72388389@ kdkfkdfkkl@ jkdjkfjd@ jjjk@
Environment.NewLine在任何字符串中随时使用。一个例子:
Environment.NewLine
string text = "fkdfdsfdflkdkfk@dfsdfjk72388389@kdkfkdfkkl@jkdjkfjd@jjjk@"; text = text.Replace("@", "@" + System.Environment.NewLine);