public boolean equalsIgnoreCase (String anotherString)
在 Java 的字符串忽略大小写比较中有个比较奇怪的做法,将 字符 转换成大写比较之后,还会将 字符 转换成小写在比较一次。
源代码中的解释是:
Unfortunately, conversion to uppercase does not work properly for the Georgian alphabet, which has strange rules about case conversion. So we need to make one last check before exiting.
翻译如下:
不幸的是,对于格鲁吉亚字母表来说,转换为大写字母并不能正常工作,因为格鲁吉亚字母表在大小写转换方面有着奇怪的规则。所以我们需要在退出前进行最后一次检查。
网友评论