[Gambas-user] How to Sort a Version String
Benoît Minisini
gambas at ...1...
Tue Feb 3 04:50:20 CET 2015
Le 03/02/2015 04:22, Christian e Ana Luiza Britto a écrit :
> Hi Folks,
> I have this sequence, returned by a select (SQL):
>
> SELECT sort FROM collections ORDER BY sort
>
> 1
> 10
> 11
> 14
> 15
> 2
> 3
> 4
> 5
> 6
> 6.12
> 6.7
> 6.7.13
> 6.7.8
> 9
>
> I need to now how to put this result into an array and sort them to
> give this output:
>
> 1
> 2
> 3
> 4
> 5
> 6
> 6.7
> 6.7.8
> 6.7.13
> 6.12
> 9
> 10
> 11
> 14
> 15
>
> I search on internet and didn't found an idea to do this.
> Best Regards,
> Christian
>
Try that: MyArray.Sort(gb.Natural)
--
Benoît Minisini
More information about the User
mailing list