替换字符串数组中的特殊字符

替换字符串数组中的特殊字符

问题描述:

你好,我有特殊字符的字符串数组单词,我想用普通字符替换它。我将标签中的文本(带有特殊字符的单词)与文本框中的文本进行比较,用户将编写(没有特殊字符的单词)。例如:

Hallo, i have string array "words" with special characters and i want to replace it with normal characters. I compare text in label (words with special characters) with text in textbox, wich user will write (words WITHOUT special characters).Example:

string[] words = { "čau", "tschüs" };
string blahblah = words[random.Next(words.Length)];
            label.Text = blahblah;
if (label.Text == textbox.Text)
            {
                do something...
            }



和我需要输出为:cau和tschus...如果在标签中将是čau并且用户写入文本框cau它将它作为一个相同的单词进行比较。

可以有人帮帮我吗?

谢谢你的回答。


And i need output to be: "cau" and "tschus"... If in label will be "čau" and user write to textbox "cau" it will compare it as a same word.
Can anybody help me?
Thank you for answer.