Humanizer icon indicating copy to clipboard operation
Humanizer copied to clipboard

Humanize string comparisons

Open mike-ward opened this issue 3 years ago • 1 comments

Sorting things the way humans expect:

Unsorted data:

Item 6
Item 2
Item 10

Using standard string comparison ordering you get:

Item 10
Item 4
Item 6

My users expect:

Item 4
Item 6
Item 10

I've got some code that handles the use cases I encounter. I could contribute as a starting point.

mike-ward avatar Jun 08 '21 14:06 mike-ward

I like the idea! I found a few dedicated libraries that do this:

Does it make sense to integrate one of those approaches into Humanizer or would it be "good enough" to know that implementations exist, in your opinion?

hangy avatar Aug 17 '21 23:08 hangy