leetcode 709. 转换成小写字母 题解 class Solution { public: string toLowerCase(string s) { string ans; for (int i = 0; i < s.size(); i++) { if (s[i] >= 'A' && s[i] <= 'Z') { s[i] += 32; } ans += s[i]; } return ans; } };