“convertir mayúsculas en minúsculas” Código de respuesta

TR en minúsculas mayúsculas

tr '[:lower:]' '[:upper:]'
Ugly Unicorn

convertir mayúsculas en minúsculas

// C++ program to convert whole string to
// uppercase or lowercase using STL.
#include<bits/stdc++.h>
using namespace std;
  
int main()
{
    // su is the string which is converted to uppercase
    string su = "Jatin Goyal";
  
    // using transform() function and ::toupper in STL
    transform(su.begin(), su.end(), su.begin(), ::toupper);
    cout << su << endl;
  
    // 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);
    cout << sl << endl;
  
    return 0;
}
Phani Simha

Respuestas similares a “convertir mayúsculas en minúsculas”

Preguntas similares a “convertir mayúsculas en minúsculas”

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código