You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by S�ren Blidorf <so...@nolas.dk> on 2004/04/30 13:06:35 UTC

Sorting string array numerically

Hi

I have a problem regarding sorting numerically.

I have the following pics:

pic_1, pic_2, pic_3, pic_4, pic_5, pic_6, pic_7, pic_8, 
pic_9, pic_10, pic_11, pic_12

But the sort makes a sort after first number then second 
number:

pic_1, pic_10, pic_11, pic_12, pic_2, pic_3, pic_4, pic_5, 
pic_6, pic_7, pic_8, pic_9

How can I make sure that the sort is numeric?

pic_1, pic_2, pic_3, pic_4, pic_5, pic_6, pic_7, pic_8, 
pic_9, pic_10, pic_11, pic_12 

BR

Soren



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org