I already checked http://www.cplusplus.com/reference/string/string/ and didn't find what I'm looking for, but I thought I'd ask anyways: is there any function in the string class that finds how many of a certain character there are in a string? If there isn't, the only way I could think of doing this would be to use string::find(), then string::erase(), and put this in a for loop, and that would be a pain...