here i have a string but i need to remove the lower case letter only i.e., mi.
primitive code is:
bool check(char c) { return !(std::isdigit(c) ||std::isalpha(c)); }
int main() {
    std::string  str = "m_ivecCadCurveEdges_Pattern";
    str.erase(std::remove_if(str.begin(), str.end(), check),str.end());
    for (std::string::size_type i=0; i<str.length(); ++i)
    {
       //if (!std::islower(str.at(i) && str.at(i) != '_')
       if (!std::islower(str.at(i)))
        {
            str.erase(0, i);
            break;
        }
    }
    if (std::isdigit(str.at(0)))
        str= "N" + str;
    std::cout<<str;
}
I want to break the loop once it reach B in the string.