📜  c# 将文件分解为单词 - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:18.587000             🧑  作者: Mango

代码示例1
var text = "'Oh, you can't help that,' said the Cat: 'we're all mad here. I'm mad. You're mad.'";
var punctuation = text.Where(Char.IsPunctuation).Distinct().ToArray();
var words = text.Split().Select(x => x.Trim(punctuation));