Remove Vowel

code

string removeVowel(const string& str)
{
    string ret;
    string vowel = "aeiouAEIOU";
    for(int i = 0; i<str.length(); i++)
    {
        char c = str[i];
        if(vowel.find(c) != string::npos)
        {
            continue;
        }
        ret.push_back(c);
    }
    return ret;
}

results matching ""

    No results matching ""