I have a string (not an array) of grade levels for a student. Here are some examples of possible entries:
k,1,2,3,4,5
1,2,3,4
1
1,2
3,4,5
Maximum grade level for a student is 5.
I want to convert the string to an english readable range. So given my above examples, this would be the output:
K & Up
1-4
1
1 & 2
3 & Up
How best to handle this? Examples are appreciated, thanks!
This could have been much easier had it not been for the involvement of the letter.