1
string turtle = "turtle"
var charArray = turtle.ToCharArray()
当我这样做:
var distinct = charArray.Distinct().ToArray()
// distinct = ["t","u","r","l","e"]
我的问题是:
我如何保存接到charArray
删除字符时我所谓的不同?我如何得到不同的变量"t"
(被删除的字符)
谢谢!
http://stackoverflow.com/questions/245369/how-do-i-get-an-array-of-repeated-characters-from-a-string-using-linq –
删除不同于输入字符串的字符串(乌龟)并获得删除字符。看到这个 - http://stackoverflow.com/questions/2201595/c-sharp-simplest-way-to-remove-first-occurance-of-a-substring-from-another-str –