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.
我有字符串'a\\\' b',我需要将这个字符串转换为字符串的算法'a' b'
'a\\\' b'
'a' b'
'a\\' b'
'a\' b'
您可以将反斜杠替换为空字符串。
string example = "'a\\\' b'"; Console.WriteLine(example.Replace("\\", string.Empty)); // Prints 'a' b'