Leetcode之0709, 修改字符串

weixicai / 2023-07-20 / 原文

 1 class Solution {
 2 public:
 3     string toLowerCase(string s) {
 4         for(char &ch: s){
 5             if(ch>='A' && ch<='Z'){
 6                 ch=tolower(ch);
 7             }
 8         }
 9         return s;
10     }
11 };