//url:https://leetcode.com/problems/to-lower-case/description/
//其实就是找出大写字母,然后换为小写就可以了
class Solution {
public:
string toLowerCase(string str) {
string result=str;
for(int i=0;i=‘A’&&result[i]<=’Z’)
result[i]=result[i]+32;
}
return result;
}
};
- 本文作者: royalchen
- 本文链接: http://www.royalchen.com/2018/07/20/leetcode-709-to-lower-case/
- 版权声明: 本博客所有文章除特别声明外,均采用 MIT 许可协议。转载请注明出处!