Aloso / lexical-sort

Sort Unicode strings lexicographically
Other
35 stars 2 forks source link

thoughts on natural sort recognizing roman numerals? #12

Closed wez closed 3 months ago

wez commented 3 months ago

I'm not sure if you'd go for this, but it can't hurt to ask! What do you think about teaching the natural number sorting logic recognizing roman numerals?

I'm currently doing this by pre-processing the string by splitting on whitespace, parsing roman numerals and replacing them with arabic/decimal integers. It works, but is relatively heavyweight.

image

Aloso commented 3 months ago

I don't think this feature is a good fit for this crate. Also, this crate isn't actively maintained and doesn't receive new features anymore. I would recommend using the icu_collator crate instead. It has more features, is more correct, and locale-sensitive. It doesn't support roman numerals either, probably because it is a very uncommon requirement.