Flex - 比较字符串而不考虑重音符号
我有一个比较例程......但我需要它来理解,当我搜索“e”时,我也会搜索“é”或“è”。
有没有一种简单的方法可以做到这一点,或者我真的需要在比较之前搜索并替换每个强调的字符?
谢谢
I have a compare routine ... but I need it to understand that when i search a "e" I also search for "é" or "è".
Is there an esay way to do that or do I really need to search and replace every accentued caractere before comparing ?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您必须搜索并替换每个字符,因为它们完全不同,并且没有语言能够确定您想要用什么替换哪些字符。请记住,编程语言不会说英语,它们会说 010101 :)
根据您想要执行此操作的语言,您可能需要考虑在谷歌上搜索预先存在的库或插件。
You have to search and replace for every character since they are entirely different and no language will be able to figure out which characters you want to replace with what. Remember, programming languages don't speak english, they speak 010101 :)
Depending on the language you want to do this in, you may want to consider googling for a pre-existing library or plugin.