NaturalSort icon indicating copy to clipboard operation
NaturalSort copied to clipboard

Offer strcmp-like return values (less-than, equal-to, greater-than 0)

Open dosena opened this issue 4 years ago • 2 comments

  • some of the detail functions already do this * _compare needs only minor tweaks to forward these from the detail funcs
  • Expose _compare (private b/c of underscore?) as compare3

dosena avatar Jan 21 '21 20:01 dosena

Ideally we'd think about renaming the old compare functions to be less or less_than, as this is more in line with what they do. Then we could just use compare for the new functionality and ditch the somewhat-awkward compare3.

But that runs the major risk of surprising people already using compare (who would then also get a "true-ish" value for greater-than and not just less-than)

But if you think of any better naming scheme, go with it by all means ... no strong opinion. (We might also consider strcmp instead of compare3 for this new stuff)

dosena avatar Jan 21 '21 21:01 dosena

Hi @dosena ,

Will it be possible for you to resolve the merge conflicts?

scopeInfinity avatar Feb 09 '21 02:02 scopeInfinity