Add Zotero.localeCompare
Can be used directly in Array.sort() as the sorting function. Uses LocaleCollateion.compareString internally
This commit is contained in:
parent
9700cdde38
commit
a56e800d7c
|
@ -1531,6 +1531,12 @@ Components.utils.import("resource://gre/modules/osfile.jsm");
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.defineProperty(this, "localeCompare", {
|
||||||
|
get: function() {
|
||||||
|
var collation = this.getLocaleCollation();
|
||||||
|
return collation.compareString.bind(collation, 1);
|
||||||
|
}
|
||||||
|
}, {lazy: true});
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Sets font size based on prefs -- intended for use on root element
|
* Sets font size based on prefs -- intended for use on root element
|
||||||
|
|
Loading…
Reference in New Issue
Block a user