std::isalnum

Da cppreference.com.
< cpp‎ | string‎ | byte

 
 
Stringhe libreria
Null-stringhe terminate
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.
Byte stringhe
Multibyte stringhe
Stringhe larghe
Classi
Original:
Classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_string
char_traits
 
Null-stringhe terminate byte
Funzioni
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Carattere manipolazione
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.
Le conversioni in formati numerici
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.
Della gestione delle stringhe
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.
strcpy
strncpy
strcat
strncat
strxfrm
String esame
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.
Memoria manipolazione
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.
memchr
memcmp
memset
memcpy
memmove
Varie
Original:
Miscellaneous
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
strerror
 
Elemento definito nell'header <cctype>
int isalnum( int ch );
Controlla se il dato carattere è un carattere alfanumerico in base alla localizzazione corrente C, vale a dire un numero (0123456789 nelle impostazioni internazionali di default), una lettera maiuscola (ABCDEFGHIJKLMNOPQRSTUVWXYZ nelle impostazioni internazionali di default), o una lettera minuscola (abcdefghijklmnopqrstuvwxyz nelle impostazioni internazionali di default).
Original:
Checks if the given character is an alphanumeric character according to the current C locale, i.e. either a number (0123456789 in the default locale), an uppercase letter (ABCDEFGHIJKLMNOPQRSTUVWXYZ in the default locale), or a lowercase letter (abcdefghijklmnopqrstuvwxyz in the default locale).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Indice

[modifica] Parametri

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

[modifica] Valore di ritorno

Valore diverso da zero (true) se il carattere è un carattere alfanumerico, 0 (false) altrimenti.
Original:
Non-zero value (true) if the character is an alphanumeric 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.

[modifica] Esempio

Viene illustrato l'utilizzo di isalnum () con diverse impostazioni internazionali (OS-specifico) .
Original:
Demonstrates the use of isalnum() with different locales (OS-specific).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

#include <iostream>
#include <cctype>
#include <clocale>
 
int main()
{
    const char c = '\xdf'; // German letter ß in ISO-8859-1
 
    std::cout << "isalnum(\'\\xdf\', default C locale) returned "
               << std::boolalpha << (bool)std::isalnum(c) << '\n';
 
    std::setlocale(LC_ALL, "de_DE.iso88591");
    std::cout << "isalnum(\'\\xdf\', ISO-8859-1 locale) returned "
              << std::boolalpha << (bool)std::isalnum(c) << '\n';
 
}

Output:

isalnum('\xdf', default C locale) returned false
isalnum('\xdf', ISO-8859-1 locale) returned true

[modifica] Vedi anche

Verifica se un carattere è classificato come alfanumerico da un locale
Original:
checks if a character is classified as alphanumeric 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.

(funzione di modello) [modifica]
Verifica se un carattere esteso è alfanumerico
Original:
checks if a wide character is alphanumeric
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(funzione) [modifica]
C documentation for isalnum
ASCII values
(hex)
characters

iscntrl
iswcntrl

isprint
iswprint

isspace
iswspace

isblank
iswblank

isgraph
iswgraph

ispunct
iswpunct

isalnum
iswalnum

isalpha
iswalpha

isupper
iswupper

islower
iswlower

isdigit
iswdigit

isxdigit
iswxdigit

0 - 80x00-0x08control codes (NUL, etc.)≠000000000000
90x09tab (\t)≠00≠0≠000000000
10 - 130x0A-0x0Dwhitespaces (\n,\v,\f,\r)≠00≠0000000000
14 - 310x0E-0x1Fcontrol codes≠000000000000
320x20space0≠0≠0≠000000000
33 - 470x21-0x2F!"#$%&'()*+,-./0≠000≠0≠0000000
48 - 570x30-0x3901234567890≠000≠00≠0000≠0≠0
58 - 640x3a-0x40:;<=>?@0≠000≠0≠0000000
65 - 700x41-0x46ABCDEF0≠000≠00≠0≠0≠000≠0
71 - 900x47-0x5AGHIJKLMNOPQRSTUVWXYZ0≠000≠00≠0≠0≠0000
91 - 960x5B-0x60[\]^_`0≠000≠0≠0000000
97 -1020x61-0x66abcdef0≠000≠00≠0≠00≠00≠0
103-1220x67-0x7Aghijklmnopqrstuvwxyz0≠000≠00≠0≠00≠000
123-1260x7B-0x7E{|}~0≠000≠0≠0000000
1270x7Fbackspace character (DEL)≠000000000000