It's gonna be a bit harder to find "21" rather than a single digit. There is no way c++ knows that you want 21 together. You'll need to figure that out yourself.
If all the digits in the string are consecutive you can use a combination of the std::string find_first_of(), std::string.substring() to isolate the digits for further processing.