Author Topic: QSort Case Sensitive ???  (Read 85 times)

Robert

  • Hero Member
  • *****
  • Posts: 555
    • View Profile
QSort Case Sensitive ???
« on: January 10, 2021, 05:35:05 PM »
Any interest in having case sensitive string sorts in BCX QSORT?

MrBcx

  • Administrator
  • Hero Member
  • *****
  • Posts: 714
    • View Profile
Re: QSort Case Sensitive ???
« Reply #1 on: January 10, 2021, 07:21:00 PM »
Hi Robert - I'm interested.
15 years ago would have been better and they say, "better late than never."

Robert

  • Hero Member
  • *****
  • Posts: 555
    • View Profile
Re: QSort Case Sensitive ???
« Reply #2 on: January 10, 2021, 07:34:31 PM »
Hi Robert - I'm interested.
15 years ago would have been better and they say, "better late than never."

Hi MrBCX:

O.K.

I've got a standalone Sort utility that I built many years ago that has case sensitive sort built in. I will see if I can merge it with what we now have.

I have not studied the problem carefully but I, again, became aware of the limitations of BCX QSort when trying to sort some UTF-8 strings which can not be sorted simply as case insensitive.

Robert

  • Hero Member
  • *****
  • Posts: 555
    • View Profile
Re: QSort Case Sensitive ???
« Reply #3 on: January 10, 2021, 08:41:57 PM »
Hi Robert - I'm interested.
15 years ago would have been better and they say, "better late than never."

Hi MrBCX:

O.K.

I've got a standalone Sort utility that I built many years ago that has case sensitive sort built in. I will see if I can merge it with what we now have.

I have not studied the problem carefully but I, again, became aware of the limitations of BCX QSort when trying to sort some UTF-8 strings which can not be sorted simply as case insensitive.

No my sort will not merge easily. My sort is a file sort that works on a memory mapped file and has capabilities for fixed width columns. Too complex to disassemble.

What we have now looks like it can be simply modified, except for MrBCX's Natural Sort which will require quite a bit more thought.

MrBCX, go at it if you like, this will take me longer than I thought.

MrBcx

  • Administrator
  • Hero Member
  • *****
  • Posts: 714
    • View Profile
Re: QSort Case Sensitive ???
« Reply #4 on: January 10, 2021, 09:26:43 PM »
Adding qsort string case sensitivity looks simple enough.  I shall put it on my to-do list.

However, I believe it is too risky to think about modifying my Qsort Natural comparison routine, so that looks like a non-starter.

MrBcx

  • Administrator
  • Hero Member
  • *****
  • Posts: 714
    • View Profile
Re: QSort Case Sensitive ???
« Reply #5 on: January 12, 2021, 07:19:41 AM »
[UPDATE]

Adding a case flag to the related prototypes and functions would be easy enough but upon closer examination, implementing case sensitivity will be a LOT more involved, requiring many changes to the parsing and code emission, not to mention all the testing that would be needed. 

Sorry to say but I'm simply not compelled to devote that much time and effort for an enhancement that I feel will mostly go unused.

Robert

  • Hero Member
  • *****
  • Posts: 555
    • View Profile
Re: QSort Case Sensitive ???
« Reply #6 on: January 12, 2021, 03:13:37 PM »
[UPDATE]

Adding a case flag to the related prototypes and functions would be easy enough but upon closer examination, implementing case sensitivity will be a LOT more involved, requiring many changes to the parsing and code emission, not to mention all the testing that would be needed. 

Sorry to say but I'm simply not compelled to devote that much time and effort for an enhancement that I feel will mostly go unused.

I hear ya, brother!