I'm trying to replace any capitals as well as lengthening any contractions used in a string. I'm trying to find the fastest and most efficient approach.
Here is my attempt, which is not working:
Note: ur
is the 'unrefined input'
//Removing Capitals
std::transform(ur.begin(), ur.end(), ur.begin(), ::tolower);
//Removing Contractions
std::replace( ur.begin(), ur.end(), "it's", "it is");
Here is what's included in the program
#include <iostream>
#include <string>
#include <algorithm>