Using C#, how can I replace similar words?

后端 未结 5 2056
孤城傲影
孤城傲影 2021-02-04 17:26

Assuming these two strings:

string s1=\"control\";
string s2=\"conrol\"; (or \"ocntrol\", \"onrtol\", \"lcontro\" etc.)

How can I programatical

5条回答
  •  执念已碎
    2021-02-04 17:57

    Linq Method: Try to store the chars in both the strings in two List or List and compare (SequenceEqual or Except) the samller one with the bigger one.

提交回复
热议问题