Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR 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;
    
 
PREVIOUS NEXT
Tagged: #convert #string #toupper #tolower #cpp
ADD COMMENT
Topic
Name
6+1 =