Hi there...
I have got an array with numbers in it. These numbers are saved as a String.
First I had them like "1", "5", ...
Then I changed it to "001", "005", ...
How can I sort that array the right way... The way I tried it does not give the right result. It is like: "001", "010", "011", "002", "003",... (the same without the leading zeros...)
The other idea was to change the String to a int or double, but I dont know how to that... Is there a way to copy a array with changing all the entries by calling a function for every entrie like (doubleValue) ??
Would prefer to sort the string array the right way....
Hope you guys can help me!
Cheers!
EDIT:
finally got the change from string to nsnumber.. sorry for that.. but i cant figure out how to sort a string array with my content right...
hopefully u guys can help me with that problem.
cheers
I have got an array with numbers in it. These numbers are saved as a String.
First I had them like "1", "5", ...
Then I changed it to "001", "005", ...
How can I sort that array the right way... The way I tried it does not give the right result. It is like: "001", "010", "011", "002", "003",... (the same without the leading zeros...)
The other idea was to change the String to a int or double, but I dont know how to that... Is there a way to copy a array with changing all the entries by calling a function for every entrie like (doubleValue) ??
Would prefer to sort the string array the right way....
Hope you guys can help me!
Cheers!
EDIT:
finally got the change from string to nsnumber.. sorry for that.. but i cant figure out how to sort a string array with my content right...
hopefully u guys can help me with that problem.
cheers
Last edited by a moderator: