Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

To Lower Case leetcode solution in c++

class Solution {
public:
    string toLowerCase(string s) {
        char ch;
        for(int i=0;i<s.length();i++)
        {
            if(s[i]>='A'&&s[i]<='Z')
            {
                ch=s[i];
                ch+=32;
                s[i]=ch;
            }
        }
        return s;
    }
};
Source by www.codegrepper.com #
 
PREVIOUS NEXT
Tagged: #To #Lower #Case #leetcode #solution
ADD COMMENT
Topic
Name
8+6 =