std::isupper - cppreference.com
Espacios de nombres
Variantes

std::isupper

De cppreference.com
 
 
 
Cadenas de bytes terminadas en nulo
Funciones
Manipulación de caracteres
Conversiones a formatos numéricos
(C++11)(C++11)
(C++11)(C++11)
Manipulación de cadenas
Examinación de cadenas
Manipulación de memoria
Misceláneos
 
Definido en el archivo de encabezado <cctype>
int isupper( int ch );
Comprueba si el carácter dado es un carácter en mayúscula de acuerdo con la actual configuración regional C. En el valor predeterminado "C", isupper devuelve true sólo para las letras mayúsculas (ABCDEFGHIJKLMNOPQRSTUVWXYZ) .
Original:
Checks if the given character is an uppercase character according to the current C locale. In the default "C" locale, isupper returns true only for the uppercase letters (ABCDEFGHIJKLMNOPQRSTUVWXYZ).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Si vuelve isupper true, se garantiza que iscntrl, isdigit, ispunct y isspace retorno false para el mismo personaje en la misma localidad C .
Original:
If isupper returns true, it is guaranteed that iscntrl, isdigit, ispunct, and isspace return false for the same character in the same C locale.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Parámetros

ch -
carácter
Original:
character
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Valor de retorno

Valor distinto de cero (true) si el carácter es una letra mayúscula, 0 (false) de otra manera .
Original:
Non-zero value (true) if the character is an uppercase letter, 0 (false) otherwise.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Ejemplo

#include <iostream>
#include <cctype>
#include <clocale>
 
int main()
{
    char c = '\xc6'; // letter Æ in ISO-8859-1
 
    std::cout << "isupper(\'\\xc6\', default C locale) returned "
               << std::boolalpha << (bool)std::isupper(c) << '\n';
 
    std::setlocale(LC_ALL, "en_GB.iso88591");
    std::cout << "isupper(\'\\xc6\', ISO-8859-1 locale) returned "
              << std::boolalpha << (bool)std::isupper(c) << '\n';

}

Salida:

isupper('\xc6', default C locale) returned false
isupper('\xc6', ISO-8859-1 locale) returned true

Ver también

Comprueba si un carácter está clasificado como una letra mayúscula por una configuración regional.
(plantilla de función) [editar]
Comprueba si un carácter ancho es un carácter en mayúscula
Original:
checks if a wide character is an uppercase character
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(función) [editar]
Documentación de C para isupper