Announcement

Collapse
No announcement yet.

GlobalList/Delimited List Helper DLL

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • GlobalList/Delimited List Helper DLL

    Allows you to sort Ascending/Descending, remove duplicates, change the first character of a string to Upper case, convert a string to all upper case, or lower case.

    BIG THANKS to KPSmith for helping me with the testing.

    Here is the info on the Functions.

    Here is a sample project that uses the DLL.

  • #2
    Re: GlobalList/Delimited List Helper DLL

    Ah... It was nothing.
    Worm did all the work, I just tried to break it [img]/ubbthreads/images/icons/smile.gif[/img]

    This is a really cool .DLL!!

    If your not sure what you would use this for check out the sample project and the light bulbs will turn on!

    First the Sound control .dll and now this!!!

    Thanks Worm

    Comment


    • #3
      Re: GlobalList/Delimited List Helper DLL

      Took a look. That's a spicy meatball! Worm strikes again...

      Corey Milner
      Creative Director, Indigo Rose Software

      Comment


      • #4
        Re: GlobalList/Delimited List Helper DLL

        Thanks fo checking it out. Hopefully it'll be useful for others too.

        Comment


        • #5
          Re: GlobalList/Delimited List Helper DLL

          Worm,

          Just wanted to say thanks again for this sort .dll

          I finally got this implemented into my "real" project.

          It saved me a whole lot of lines of code and it is much, much faster than using a list box to sort and two global lists to remove duplicates.

          Not to mention I can also ensure the first letter of every item is capitalized.

          Your Dll is now sorting and removing duplicates within a string of more than 3000 records and it finishes within seconds.

          Comment


          • #6
            Re: GlobalList/Delimited List Helper DLL

            Wooo Hooooo!

            Couldn't have done it without you.

            Comment


            • #7
              Re: GlobalList/Delimited List Helper DLL

              Hey Worm...what sort algorithm did you use? (Did you roll your own, or just use qsort?)
              --[[ Indigo Rose Software Developer ]]

              Comment


              • #8
                Re: GlobalList/Delimited List Helper DLL

                Unforunately, eh-hem... a Bubble Sort [img]/ubbthreads/images/icons/crazy.gif[/img]

                I'd like to modify the code to use qsort, but I'm still learning, and bubble sort I can do. Thought I'd get it up and running and then go for optimization.

                Any pointers (C++ pun intended) on the qsort, please send them my way.

                Comment


                • #9
                  Re: GlobalList/Delimited List Helper DLL

                  qsort() is built into the standard library. [img]/ubbthreads/images/icons/smile.gif[/img] As for pointers, Google is your friend.

                  One thing to keep in mind is that the actual sorting algorithm(s) used by qsort() is implementation dependent. It could be quicksort, it could be quicker-sort, it could be an insertion sort. It's not necessarily the fastest (although I'd wager it would be faster than a bubble sort [img]/ubbthreads/images/icons/wink.gif[/img]) but it's definitely a lot easier than rolling your own.

                  Be aware that, since the actual sorting algorithm depends on the compiler, qsort() may or may not use a stable sorting algorithm. ("Stable" in the sense that equivalent items retain their original positions in the list.)

                  For smallish lists of strings like this, I'd probably use an insertion sort if I didn't have access to C++, e.g. if I were coding the algorithm inside AutoPlay or something. Either that or a merge sort. All depends on the data.

                  There isn't any cut-and-dried "best" algorithm for everything, though...it all depends on the kind of data that will need to be sorted.
                  --[[ Indigo Rose Software Developer ]]

                  Comment


                  • #10
                    Re: GlobalList/Delimited List Helper DLL

                    BTW, if you're using STL (the standard template library), the STL sort is even faster. Way, way faster.

                    More info
                    --[[ Indigo Rose Software Developer ]]

                    Comment


                    • #11
                      Re: GlobalList/Delimited List Helper DLL

                      Thanks for the references, Lorne. I'll look into the sorting methods and see if I can figure it out. I knew when I coded the sort that it wouldn't be the most optimized way to go and that I'd eventually go back and change it.

                      But as project deadlines won't wait on my learning curve, one does as he must.

                      I appreciate yours, Corey's and Brett's input and help. Thank you!

                      Comment


                      • #12
                        Re: GlobalList/Delimited List Helper DLL

                        Just for the record I much prefer to do stuff like this using a flash object. But then I'm .dll ign'nt so there you have it... It's supereasy to just whip up some actionscript and drop it in to do things like this, takes just a few minutes and performance seems superb so far. I have a bunch of stuff on this on the new Powertips CD.

                        Corey Milner
                        Creative Director, Indigo Rose Software

                        Comment


                        • #13
                          Re: GlobalList/Delimited List Helper DLL

                          I think I also should thank Worm for creating this .DLL for this file is probably the basis of my project too.

                          I don't think i'm the only one if I say that Worm has been a great contributor to my project! Thanks Brad!

                          Comment


                          • #14
                            Re: GlobalList/Delimited List Helper DLL

                            Gents

                            Can i use that DLL to remove BLANK SPACE at begining and End of each items stored into a global list?? I have an Urgent need for something that would do that.

                            Please Help

                            Martin

                            Comment


                            • #15
                              Re: GlobalList/Delimited List Helper DLL

                              Honestly can't remember what funtions are built into it. I'd have to look at the source.

                              Why not pull the contents of the GL to a variable and do a string replace " ;;" with ";;" and ";; " with ";;". Then reinsert to the GL?

                              Comment

                              Working...
                              X