String.prototype.localeCompare()

localeCompare() 方法返回一个数字来指示一个参考字符串是否在排序顺序之前、之后或与给定字符串相同。在支持 Intl.Collator API 的实现中,该方法仅是调用了 Intl.Collator 方法。

尝试一下