Implement function ToLowerCase() that has a string parameter str, and returns the same string in lowercase.
原文链接:https://leetcode.com/problems/to-lower-case/
水。。。
class Solution {
public:
string toLowerCase(string str) {
for(int i=0; i < str.size(); i++) {
if(str[i] >= 65 && str[i] <= 90) {
cout << str[i] << endl;
str[i] += 32;
}
}
return str;
}
};