为什么我会看到从.NET的StartsWith这个意外的行为? [英] Why am I seeing this unexpected behavior from .NET's StartsWith?
本文介绍了为什么我会看到从.NET的StartsWith这个意外的行为?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这必须是一个.NET的错误,对吧?
This must be a .NET bug, right?
KonNy.StartsWith(昆)
返回false,而KonNy.StartsWith(高)
和KonN.StartsWith(昆)
返回true。
"KonNy".StartsWith("Kon")
returns false, while "KonNy".StartsWith("Ko")
and "KonN".StartsWith("Kon")
return true.
这有什么,我在这里失踪?
Is there anything I'm missing here?
推荐答案
从注释重复:
我不知道.NET具体,但我怀疑你可能会注意到这个现象,如果 StartsWith
遵循整理其中南阳
是一个字母,如匈牙利。如果我是对的,如果你改变你的排序规则是中性的,你的错误将消失。 :)
I don't know .NET specifically, but I suspected you might observe this phenomenon if StartsWith
followed a collation where nny
was a single letter, such as Hungarian. If I'm right and if you change your collation to a neutral one, your "bug" would disappear. :)
这篇关于为什么我会看到从.NET的StartsWith这个意外的行为?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文