Exemple #1
0
int main(void)
{
    char str[] = "HElLo, WoRlD";
    myLower( str );
    printf("%s\n", str );
 
    return 0;
}
/**
 * Converts the given String to lower case (using ASCII locale) and returns
 * the address of the string.
 */
char* toLower(char *s)
{
    for (char *it = s; *it; ++it)
        myLower(*it);
    return s;
}
/**
 * Converts the given String to lower case (using ASCII locale) and returns
 * the address of the string.
 */
std::string& toLower(std::string &s)
{
    for (auto it = s.begin(); it != s.end(); ++it)
        myLower(*it);
    return s;
}