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

std::ispunct

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
 
<tbody> </tbody>
Definido en el archivo de encabezado <cctype>
int ispunct( int ch );
Comprueba si el carácter es un carácter dado puntuacion en el actual entorno nacional C. El valor por defecto C locale clasifica el !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ personajes como puntuacion .
Original:
Checks if the given character is a punctuation character in the current C locale. The default C locale classifies the characters !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ as punctuation.
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 un carácter puntuacion, 0 (false) de otra manera .
Original:
Non-zero value (true) if the character is a punctuation 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.

Ejemplo

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

int main()
{
    char c = '\xd7'; // the character × (multiplication sign) in ISO-8859-1

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

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

Salida:

ispunct('\xd7', default C locale) returned false
ispunct('\xd7', ISO-8859-1 locale) returned true

Ver también

Comprueba si un carácter está clasificado como signo de puntuación por una configuración regional.
(plantilla de función) [editar]
Comprueba si un carácter ancho es un personaje de puntuacion
Original:
checks if a wide character is a punctuation 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 ispunct