Is there a simple way to parse the following String to List of Integers:
String s = "1,2,5-9,11,12"
// expected values list: [1,2,5,6,7,8,9,11,12]
List<Integer> values = magicallyGetListFromString(s);
I was wondering if there is a simple way to do it, rather than writing it by myself.