The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
Sorting Strings
07-10-2017, 12:18 AM
Post: #1
Sorting Strings
Hello,

I'm starting to work on a project for the HP Prime calculator, and I quickly realized that it would be quite useful to have a "natural order" sort for lists of strings for this project, see http://www.davekoelle.com/alphanum.html. As far as I know and can tell, this is not currently implemented with the SORT command.

Before I take a crack at implementing the algorithm, I wanted to check if anyone had made such an effort already? If not, it might be an interesting challenge to collaborate on with anyone who is interested. At first glance it looks like it could be somewhat involved because the PPL language doesn't have the wealth of string functionality built in that a language like Python does, for example.

My thoughts so far:
1. Input would be a list of strings
2. Flag to sort by case-sensitive or not, for example A, a, B, b ... instead of A, B ... a, b ...
3. Return sorted list, or original list if less than 2 elements in list

Any comments or interest?

Jacob
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Sorting Strings - Jacob Wall - 07-10-2017 12:18 AM
RE: Sorting Strings - webmasterpdx - 07-10-2017, 04:58 AM
RE: Sorting Strings - Joe Horn - 07-10-2017, 07:22 AM
RE: Sorting Strings - Jacob Wall - 07-10-2017, 05:02 PM
RE: Sorting Strings - Tyann - 07-11-2017, 05:03 AM
RE: Sorting Strings - Tyann - 07-11-2017, 06:06 PM
RE: Sorting Strings - Jacob Wall - 07-11-2017, 06:21 PM
RE: Sorting Strings - Didier Lachieze - 07-11-2017, 11:32 PM
RE: Sorting Strings - Gilles59 - 07-12-2017, 08:28 PM
RE: Sorting Strings - Han - 07-12-2017, 12:32 AM
RE: Sorting Strings - Jacob Wall - 07-12-2017, 05:10 AM
RE: Sorting Strings - Jacob Wall - 07-14-2017, 07:02 AM
RE: Sorting Strings - Didier Lachieze - 07-14-2017, 08:11 AM
RE: Sorting Strings - Jacob Wall - 07-15-2017, 03:00 AM



User(s) browsing this thread: 10 Guest(s)