How to compare and sort and array of strings at the same time
I need to be able to manipulate seems a two-dimensional array in SP 5.1.
What Iím looking for is: from an linear array of strings I have to eliminate that are equal and then sort them, so I could find the greatest one.
It turns out I need to:
1) Compare my strings so thay are not equal (if they are, I need to take the next available string and repeat comparison till they are not equal);
2) The same time I need to keep sorting them while placing in the correct order.
The problem is that I did it for 3 strings and it seems to be an awkward code.
When I started thinking about 10 strings, I realized that I need to work with arrays and Iím not sure how to do thatÖ.
So, Iím wondering if any one has come up with a way to do this in SP?
Re: How to compare and sort and array of strings at the same time
Hi Prasad, Thank you for considering my question...
First, Iím going to parse X random strings (same pattern) from the response;
then, I need to eliminate those are equal (and replace if any), so I will still have X different random strings;
now I need to sort them, though essentially, I just have to find the greatest one.