Natural order sorting in vb
-
HELLO ALL; Does anybody have idea how to do Natural order sorting in vb e.g. If i ahev entries like 1 2 11 111 A AA B then it sors like 1 11 111 2 A AA AAA B So do u have any idea how to implement natural sort? Thanx in advance
As you see, the sorting take in consideration the word lenght, so to get a "Natural" sorting you can formatting all the worlds to have the same lenght by concatenating 0 before each word. For example, if you have 1 2 11 111 A AA B so format them as following: 001 002 011 111 00A 0AA 00B and now sort. Hope it helps
Shay Noy
-
HELLO ALL; Does anybody have idea how to do Natural order sorting in vb e.g. If i ahev entries like 1 2 11 111 A AA B then it sors like 1 11 111 2 A AA AAA B So do u have any idea how to implement natural sort? Thanx in advance
-
-
Thanx for the quick reply I thought of padding but there can be a seperator e.g A - 1 1 * A 2 # 5 which makes dificult to sort do u have any idea what can be the solution in this case? Thanx
either the items are valid file names and I gave you the answer already, or they aren't and you have to write code to do it yourself. :)
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
-
either the items are valid file names and I gave you the answer already, or they aren't and you have to write code to do it yourself. :)
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages