Results 1 to 4 of 4

Thread: Sorting or Comparing Strings

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jul 2000
    Posts
    94
    When Sorting strings in a listbox is there an easy way to make sure that it doesnt put "10" and "100" next to each other? When ever I set sorted to true I get things like this:
    "10"
    "100"
    "11"

    I can roll my own sort if I must but I would rather find an easier way.

    BTW my list also contains non-numerical values.

    Thanks,
    Cthulhu Dragon

  2. #2
    Fanatic Member steve65's Avatar
    Join Date
    Jun 2000
    Posts
    610
    I have heard that you can pad the "10" with a space in front " 10" so that it will sort correctly .
    This space for rent...

  3. #3
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221

    just an idea

    You could put all your items in an array of fixed strings, and right align all items, using format function
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  4. #4
    Guest
    I have made a DLL that sorts strings very fast.

    --------

    If You.Want("My Dll") Then
    SendEmail("[email protected]")
    Else
    You.SuitYourself("!")
    End If

    --------

    hehehe


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width