Given a string, convert the whole string to uppercase or lowercase using STL in C++.
For uppercase conversion Input : s = "String" Output : s = "STRING" For lowercase conversion Input : s = "String" Output : s = "string"
Functions used :
transform : Performs a transformation on given array/string.
toupper(int c) : Returns upper case version of character c. If c is already in uppercase, return c itself.
tolower(int c) : Returns lower case version of character c. If c is already in lowercase, return c itself.
JATIN GOYAL jatin goyal
This article is contributed by Jatin Goyal. If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- Cons of using the whole namespace in C++
- C++ Program that will fill whole memory
- Smallest greater elements in whole array
- ios manipulators uppercase() function in C++
- Conversion of Struct data type to Hex String and vice versa
- What is conversion constructor in C++?
- Advanced C++ | Conversion Operators
- Type Conversion in C++
- Catch block and type conversion in C++
- Permutations of a given string using STL
- Counts of distinct consecutive sub-string of length two using C++ STL
- Find and print duplicate words in std::vector<string> using STL functions
- Lexicographic rank of a string using STL
- Remove all consecutive duplicates from a string using STL in C++
- Remove duplicates from a string using STL in C++
- Count number of unique Triangles using STL | Set 1 (Using set)
- Kruskal's Minimum Spanning Tree using STL in C++
- Dijkstra’s shortest path algorithm using set in STL
- Dijkstra's Shortest Path Algorithm using priority_queue of STL
- Prim's algorithm using priority_queue in STL