I am looking for the best way to extract the integer from these strings:
Next Day
2 Days
3 Days
...
29 Days
30 Days
30+ Days
I could do this with substrings but I'm just wondering if there is a simpler function which would automatically attempt to convert the string to an integer (similar to PHP's intval()
function, for example.