按字母顺序比较两个希伯来字符串
Compare Two Hebrew Strings Alphabetically
我知道我可以使用 String.Compare(StringA, StringB)
比较两个字符串,看看哪个字符串按字母顺序排在第一位
但是,我用两个希伯来语字符串尝试了这个,但它没有按字母顺序进行比较。
是否有其他方法可以做到这一点,或者我是否必须更改编码?
尝试
String.Compare(StringA, StringB, new CultureInfo("he"), CompareOptions.None)
其中 he
是希伯来语的代码。
Compare
有多个重载。 Here is the documentation 对于上面的例子。
我知道我可以使用 String.Compare(StringA, StringB)
比较两个字符串,看看哪个字符串按字母顺序排在第一位
但是,我用两个希伯来语字符串尝试了这个,但它没有按字母顺序进行比较。
是否有其他方法可以做到这一点,或者我是否必须更改编码?
尝试
String.Compare(StringA, StringB, new CultureInfo("he"), CompareOptions.None)
其中 he
是希伯来语的代码。
Compare
有多个重载。 Here is the documentation 对于上面的例子。