string[] myArray= { "replay", "answer" };
if (myArray.Contains("rểplay")) {
//...
}
This function will return false since it try to check diacritics word "rểplay" instead of "replay". How can I ignore nonspacing combining characters, such as diacritics and return true?
And how can it work for vice versa like below?
string[] myArray= { "rểplay", "answer" };
if (myArray.Contains("replay")) {
//...
}
And how to applied in this function also?
var ix = Array.FindIndex(myKeys, p => p.Equals(wordIn, StringComparison.CurrentCultureIgnoreCase));
wordOut = myKeys[ix];
return true;