Search
 
SCRIPT & CODE EXAMPLE
 

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;
    }
};
Comment

PREVIOUS NEXT
Code Example
Cpp :: palindrome checker in c++ 
Cpp :: c++ modulo positive 
Cpp :: c++ string to int 
Cpp :: int to float c++ 
Cpp :: sizeof operator in c++ 
Cpp :: long to string cpp 
Cpp :: change colour of output to terminal c++ 
Cpp :: ascii conversion cpp 
Cpp :: union of two arrays leetcode 
Cpp :: print vector c++ 
Cpp :: hexadecimal or binary to int c++ 
Cpp :: max in c++ 
Cpp :: unordered_set to vector 
Cpp :: binary search c++ 
Cpp :: c pre-processor instructions 
Cpp :: c++ string conversion operator 
Cpp :: c++ base constructor 
Cpp :: c++ random generator 
Cpp :: set to vector 
Cpp :: cin exceptions c++ 
Cpp :: transformer in nlp 
Cpp :: c++ reverse part of vector 
Cpp :: C++ Nested if...else 
Cpp :: break statement in c++ program 
Cpp :: How to split a string by Specific Delimiter in C/C++ 
Cpp :: c++ uint8_t header 
Cpp :: create new node in tree 
Cpp :: c++ count vector elements 
Cpp :: balanced parentheses 
Cpp :: find maximum sum in array of contiguous subarrays 
ADD CONTENT
Topic
Content
Source link
Name
3+2 =