替换字符串数组中的特殊字符 [英] Replace special characters in string array

查看:122
本文介绍了替换字符串数组中的特殊字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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.

推荐答案

见这里:从字符串中删除变音符号 [ ^ ]


这篇关于替换字符串数组中的特殊字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆