I am a bit attached. I am working with an outdated system that contains a bunch of delimited strings that I need to parse. Unfortunately, strings need to be ordered based on the first part of the string. The array looks something like this:
array[0] = "10|JohnSmith|82";
array[1] = "1|MaryJane|62";
array[2] = "3|TomJones|77";
So, I would like the array to look like
array[0] = "1|MaryJane|62";
array[1] = "3|TomJones|77";
array[2] = "10|JohnSmith|82";
I was thinking of making a 2-dimensional array in order to capture the first part and leave the string in the second part, but can I mix types in a two-dimensional array?
I'm not sure how to handle this situation, can anyone help? Thanks!
source
share