Cathy,

You'd need to write a dedicated sort routine that would understand the meaning inside 
your strings. As it stands, the strings are sorting the way they should if they are 
viewed simply as plain character based data. Or if you know that the numerical digits 
on the end of the strings need to be sorted, you could try putting leading zeroes 
infront of them. That would then give you a sort sequence of test01, test02, test10.

Hope this helps.

Simon

-----------------------------------------------------------------
Simon P. Chappell                     [EMAIL PROTECTED]
Java Programming Specialist                      www.landsend.com
Lands' End, Inc.                                   (608) 935-4526


>-----Original Message-----
>From: Cathy Osekizoglu [mailto:hinbsls@;yahoo.ca]
>Sent: Thursday, October 17, 2002 10:18 AM
>To: [EMAIL PROTECTED]
>Subject: String comparation
>
>
>
>This question is not related to struts. Sorry I ask here 
>because I don't know where I should put this message. Please 
>help me forward to the right place if you know. 
>
>If you know the answer, please help me. Thanks.
>
>My question:
>
>How to compare test1, test10 and test2, 
>
>so that the result will be test1, test2, test10. Now I got 
>test1, test10, test2
>
>Thanks again
>
>
>
>---------------------------------
>Post your free ad now! Yahoo! Canada Personals
>

--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>

Reply via email to