- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Conversion of whole String to uppercase or lowercase using STL in C++
In this tutorial, we will be discussing a program to understand conversion of whole string to uppercase or lowercase using STL in C++.
To perform this transformation, C++ STL provides toupper() and tolower() functions to convert to uppercase and lowercase respectively.
Example
#include<bits/stdc++.h> using namespace std; int main(){ string su = "Tutorials point"; transform(su.begin(), su.end(), su.begin(), ::toupper); cout << su << endl; string sl = "Tutorials Point"; transform(sl.begin(), sl.end(), sl.begin(), ::tolower); cout << sl << endl; return 0; }
Output
TUTORIALS POINT tutorials point
- Related Articles
- Convert string to lowercase or uppercase in Arduino
- Making a Java String All Uppercase or All Lowercase.
- How to test if a letter in a string is uppercase or lowercase using javascript?
- How to check whether a string is in lowercase or uppercase in R?
- Write a C program to convert uppercase to lowercase letters without using string convert function
- Replacing upperCase and LowerCase in a string - JavaScript
- How to convert lowercase letters in string to uppercase in Python?
- Count spaces, uppercase and lowercase in a sentence using C
- Java program to convert a string to lowercase and uppercase.
- How to convert all uppercase letters in string to lowercase in Python?
- How to convert the content of the file into uppercase or lowercase?
- C Program for LowerCase to UpperCase and vice-versa
- Golang Program to convert Uppercase to Lowercase characters, using binary operator.
- Maximum distinct lowercase alphabets between two uppercase in C++
- Converting Odd and Even-indexed characters in a string to uppercase/lowercase in JavaScript?

Advertisements