I have the following two possible contents of a String. Obviously the amounts always vary and I would like to extract the key information and
Case 0: pricesString = ""
Case 1: pricesString = "$0.023"
Case 2: pricesString = "10+: $1.46 100+: $0.16 500+: $0.04"
In Case 0 I would like to do nothing.
In Case 1 I would like to perform:
article.addPrice(1, 0.023);
In Case 2 I would like to perform:
article.addPrice(10, 1.46);
article.addPrice(100, 0.16);
article.addPrice(500, 0.04);
How can I extract this information so I can can call article.addPrice with the float and integer values contained?