LeetCode 709 To Lower Case 转换成小写字母

class Solution {
public:
    string toLowerCase(string str) {
        for(auto &c:str)
        {
            if(c>='A' && c<='Z')
                c+=32;
        }
        return str;
    }
};

猜你喜欢

转载自blog.csdn.net/qq_34501451/article/details/83240393
今日推荐