Leetcode之0709, 修改字符串
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 };
本文来自博客园,作者:安然春夏,转载请注明原文链接:https://www.cnblogs.com/weixicai/p/17567179.html。测试只能证明程序有错误,而不能证明程序没有错误。你必须非常努力,才能看起来毫不费力。