std::iscntrl - cppreference.com
Espaços nominais
Variantes
Ações

std::iscntrl

De cppreference.com

<metanoindex/>

 
 
Biblioteca cordas
Strings terminadas
Original:
Null-terminated strings
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Cadeias de bytes
Multibyte cordas
Cordas de largura
Classes
Original:
Classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 
Cordas de terminação nula de bytes
Funções
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Manipulação personagem
Original:
Character manipulation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Conversões para formatos numéricos
Original:
Conversions to numeric formats
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Manipulação de cadeia
Original:
String manipulation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Exame String
Original:
String examination
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Manipulação de memória
Original:
Memory manipulation
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Diversos
Original:
Miscellaneous
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 
<tbody> </tbody>
Definido no cabeçalho <cctype>
int iscntrl( int ch );
Verifica se o caráter dado é classificado como um caractere de controle pela localidade C instalado atualmente. No local padrão C, os caracteres de controle são os personagens com os códigos de 0x00-0x1F e 0x7F.
Original:
Checks if the given character is classified as a control character by the currently installed C locale. In the default C locale, the control characters are the characters with the codes 0x00-0x1F and 0x7F.
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 -
personagem
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 diferente de zero (true) se o personagem é um caractere de controle, 0 (false) de outra forma.
Original:
Non-zero value (true) if the character is a control character, 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.

Exemplo

#include <iostream>
#include <cctype>
#include <clocale>

int main()
{
    char c = '\x94'; // the control code CCH in ISO-8859-1

    std::cout << "iscntrl(\'\\x94\', default C locale) returned "
               << std::boolalpha << (bool)std::iscntrl(c) << '\n';

    std::setlocale(LC_ALL, "en_GB.iso88591");
    std::cout << "iscntrl(\'\\x94\', ISO-8859-1 locale) returned "
              << std::boolalpha << (bool)std::iscntrl(c) << '\n';

}

Saída:

iscntrl('\x94', default C locale) returned false
iscntrl('\x94', ISO-8859-1 locale) returned true

Veja também

checa se o caractere é classificado como um caractere de controle de uma localidade
Original:
checks if a character is classified as a control character by a locale
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(modelo de função) [edit]
checa se o personagem de largura é um caractere de controle
Original:
checks if a wide character is a control character
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função) [edit]
Documentação C para iscntrl