Search
 
SCRIPT & CODE EXAMPLE
 

CPP

convert string toupper and tolower in cpp

#include <algorithm>

// using transform() function and ::tolower in STL
    transform(sl.begin(), sl.end(), sl.begin(), ::tolower);
    cout << sl << endl;
    
    // using transform() function and ::toupper in STL
    transform(su.begin(), su.end(), su.begin(), ::toupper);
    cout << su << endl;
    
Comment

how to convert string into lowercase in cpp

  // sl is the string which is converted to lowercase 
    string sl = "Jatin Goyal"; 
  
    // using transform() function and ::tolower in STL 
    transform(sl.begin(), sl.end(), sl.begin(), ::tolower); 
Comment

PREVIOUS NEXT
Code Example
Cpp :: setprecision c++ 
Cpp :: aray of functions in c++ 
Cpp :: how to get the first element of a map in c++ 
Cpp :: string in cpp 
Cpp :: round double to 2 decimal places c++ 
Cpp :: get value of enum cpp 
Cpp :: c++ template function 
Cpp :: check if char in string c++ 
Cpp :: 1523. Count Odd Numbers in an Interval Range solution in c++ 
Cpp :: matrix in vector c++ 
Cpp :: stl sort in c++ 
Cpp :: length of array in cpp 
Cpp :: cpp vector2 
Cpp :: c++ print 3d cube 
Cpp :: factorial function c++ 
Cpp :: c++ encapsulation 
Cpp :: c++ rand include 
Cpp :: vector find 
Cpp :: c++ min int 
Cpp :: input cpp 
Cpp :: cpp func as const 
Cpp :: c++ check if string is isogram 
Cpp :: Search Insert Position leetcode solution in cpp 
Cpp :: operand-- c++ 
Cpp :: use of alphanumeric function c++, check if alphabet or digit from string 
Cpp :: print stack without pop c++ 
Cpp :: c++ program to convert character to ascii 
Cpp :: C++ :: 
Cpp :: polymorphism in c++ 
Cpp :: exponent power of x using c c++ 
ADD CONTENT
Topic
Content
Source link
Name
7+8 =