Classificazione di caratteriCharacter Classification

Ognuna di queste routine verifica una specifico carattere a byte singolo, un carattere wide o un carattere multibyte per soddisfare una condizione.Each of these routines tests a specified single-byte character, wide character, or multibyte character for satisfaction of a condition. Per definizione, il set di caratteri ASCII tra 0 e 127 è un sottoinsieme di tutti i caratteri multibyte.(By definition, the ASCII character set between 0 and 127 are a subset of all multibyte-character sets. Ad esempio, il giapponese katakana comprende caratteri ASCII e non ASCII.For example, Japanese katakana includes ASCII as well as non-ASCII characters.)

Le condizioni di verifica interessano l'impostazione della categoria LC_CTYPE delle impostazioni locali. Per altre informazioni, vedere setlocale.The test conditions are affected by the setting of the LC_CTYPE category setting of the locale; see setlocale for more information. Le versioni di queste funzioni senza il suffisso _l usano le impostazioni locali correnti per questo comportamento dipendente dalle impostazioni locali. Le versioni con il suffisso _l sono identiche ma usano il parametro passato relativo alle impostazioni locali.The versions of these functions without the _l suffix use the current locale for this locale-dependent behavior; the versions with the _l suffix are identical except that they use the locale parameter passed in instead.

In genere queste routine hanno una maggiore velocità di esecuzione rispetto alle routine di test che si potrebbero scrivere e devono essere favorite rispetto a queste ultime.Generally these routines execute faster than tests you might write and should be favored over. Ad esempio, il codice seguente viene eseguito più lentamente rispetto a una chiamata a isalpha(c):For example, the following code executes slower than a call to isalpha(c):

if ((c >= 'A') && (c <= 'Z')) || ((c >= 'a') && (c <= 'z'))  
    return TRUE;  

Routine di classificazione dei caratteriCharacter-Classification Routines

RoutineRoutine Condizione di test del carattereCharacter test condition
isalnum, iswalnum, _isalnum_l, _iswalnum_l, _ismbcalnum, _ismbcalnum_l, _ismbcalpha, _ismbcalpha_l, _ismbcdigit, _ismbcdigit_lisalnum, iswalnum, _isalnum_l, _iswalnum_l, _ismbcalnum, _ismbcalnum_l, _ismbcalpha, _ismbcalpha_l, _ismbcdigit, _ismbcdigit_l Carattere alfanumericoAlphanumeric
_ismbcalnum, _ismbcalnum_l, _ismbcalpha, _ismbcalpha_l, _ismbcdigit, _ismbcdigit_l_ismbcalnum, _ismbcalnum_l, _ismbcalpha, _ismbcalpha_l, _ismbcdigit, _ismbcdigit_l Carattere alfanumericoAlphanumeric
isalpha, iswalpha, _isalpha_l, _iswalpha_l, _ismbcalnum, _ismbcalnum_l, _ismbcalpha, _ismbcalpha_l, _ismbcdigit, _ismbcdigit_lisalpha, iswalpha, _isalpha_l, _iswalpha_l, _ismbcalnum, _ismbcalnum_l, _ismbcalpha, _ismbcalpha_l, _ismbcdigit, _ismbcdigit_l Carattere alfabeticoAlphabetic
isascii, __isascii, iswasciiisascii, __isascii, iswascii ASCIIASCII
isblank, iswblank, _isblank_l, _iswblank_l, _ismbcsblank, _ismbcsblank_lisblank, iswblank, _isblank_l, _iswblank_l, _ismbcsblank, _ismbcsblank_l Spazio vuoto (spazio o tabulazione orizzontale)Blank (space or horizontal tab)
iscntrl, iswcntrl, _iscntrl_l, _iswcntrl_liscntrl, iswcntrl, _iscntrl_l, _iswcntrl_l ControlloControl
iscsym, iscsymf, __iscsym, __iswcsym, __iscsymf, __iswcsymf, _iscsym_l, _iswcsym_l, _iscsymf_l, _iswcsymf_liscsym, iscsymf, __iscsym, __iswcsym, __iscsymf, __iswcsymf, _iscsym_l, _iswcsym_l, _iscsymf_l, _iswcsymf_l Lettera, carattere di sottolineatura o cifraLetter, underscore, or digit
iscsym, iscsymf, __iscsym, __iswcsym, __iscsymf, __iswcsymf, _iscsym_l, _iswcsym_l, _iscsymf_l, _iswcsymf_liscsym, iscsymf, __iscsym, __iswcsym, __iscsymf, __iswcsymf, _iscsym_l, _iswcsym_l, _iscsymf_l, _iswcsymf_l Lettera o carattere di sottolineaturaLetter or underscore
isdigit, iswdigit, _isdigit_l, _iswdigit_l, _ismbcalnum, _ismbcalnum_l, _ismbcalpha, _ismbcalpha_l, _ismbcdigit, _ismbcdigit_lisdigit, iswdigit, _isdigit_l, _iswdigit_l, _ismbcalnum, _ismbcalnum_l, _ismbcalpha, _ismbcalpha_l, _ismbcdigit, _ismbcdigit_l Cifra decimaleDecimal digit
isgraph, iswgraph, _isgraph_l, _iswgraph_l, _ismbcgraph, _ismbcgraph_l, _ismbcprint, _ismbcprint_l, _ismbcpunct, _ismbcpunct_l, _ismbcblank, _ismbcblank_l, _ismbcspace, _ismbcspace_lisgraph, iswgraph, _isgraph_l, _iswgraph_l, _ismbcgraph, _ismbcgraph_l, _ismbcprint, _ismbcprint_l, _ismbcpunct, _ismbcpunct_l, _ismbcblank, _ismbcblank_l, _ismbcspace, _ismbcspace_l Stampabile, diverso da uno spazioPrintable other than space
islower, iswlower, _islower_l, _iswlower_l, _ismbclower, _ismbclower_l, _ismbcupper, _ismbcupper_lislower, iswlower, _islower_l, _iswlower_l, _ismbclower, _ismbclower_l, _ismbcupper, _ismbcupper_l MinuscoleLowercase
_ismbchira, _ismbchira_l, _ismbckata, _ismbckata_l_ismbchira, _ismbchira_l, _ismbckata, _ismbckata_l HiraganaHiragana
_ismbchira, _ismbchira_l, _ismbckata, _ismbckata_l_ismbchira, _ismbchira_l, _ismbckata, _ismbckata_l KatakanaKatakana
_ismbclegal, _ismbclegal_l, _ismbcsymbol, _ismbcsymbol_l_ismbclegal, _ismbclegal_l, _ismbcsymbol, _ismbcsymbol_l Carattere multibyte validoLegal multibyte character
_ismbcl0, _ismbcl0_l, _ismbcl1, _ismbcl1_l, _ismbcl2, _ismbcl2_l_ismbcl0, _ismbcl0_l, _ismbcl1, _ismbcl1_l, _ismbcl2, _ismbcl2_l Carattere multibyte giapponese di livello 0Japan-level 0 multibyte character
_ismbcl0, _ismbcl0_l, _ismbcl1, _ismbcl1_l, _ismbcl2, _ismbcl2_l_ismbcl0, _ismbcl0_l, _ismbcl1, _ismbcl1_l, _ismbcl2, _ismbcl2_l Carattere multibyte giapponese di livello 1Japan-level 1 multibyte character
_ismbcl0, _ismbcl0_l, _ismbcl1, _ismbcl1_l, _ismbcl2, _ismbcl2_l_ismbcl0, _ismbcl0_l, _ismbcl1, _ismbcl1_l, _ismbcl2, _ismbcl2_l Carattere multibyte giapponese di livello 2Japan-level 2 multibyte character
_ismbclegal, _ismbclegal_l, _ismbcsymbol, _ismbcsymbol_l_ismbclegal, _ismbclegal_l, _ismbcsymbol, _ismbcsymbol_l Carattere multibyte non alfanumericoNon-alphanumeric multibyte character
isprint, iswprint, _isprint_l, _iswprint_l, _ismbcgraph, _ismbcgraph_l, _ismbcprint, _ismbcprint_l, _ismbcpunct, _ismbcpunct_l, _ismbcblank, _ismbcblank_l, _ismbcspace, _ismbcspace_lisprint, iswprint, _isprint_l, _iswprint_l, _ismbcgraph, _ismbcgraph_l, _ismbcprint, _ismbcprint_l, _ismbcpunct, _ismbcpunct_l, _ismbcblank, _ismbcblank_l, _ismbcspace, _ismbcspace_l Carattere stampabilePrintable
ispunct, iswpunct, _ispunct_l, _iswpunct_l, _ismbcgraph, _ismbcgraph_l, _ismbcprint, _ismbcprint_l, _ismbcpunct, _ismbcpunct_l, _ismbcblank, _ismbcblank_l, _ismbcspace, _ismbcspace_lispunct, iswpunct, _ispunct_l, _iswpunct_l, _ismbcgraph, _ismbcgraph_l, _ismbcprint, _ismbcprint_l, _ismbcpunct, _ismbcpunct_l, _ismbcblank, _ismbcblank_l, _ismbcspace, _ismbcspace_l PunctuationPunctuation
isspace, iswspace, _isspace_l, _iswspace_l, _ismbcgraph, _ismbcgraph_l, _ismbcprint, _ismbcprint_l, _ismbcpunct, _ismbcpunct_l, _ismbcblank, _ismbcblank_l, _ismbcspace, _ismbcspace_lisspace, iswspace, _isspace_l, _iswspace_l, _ismbcgraph, _ismbcgraph_l, _ismbcprint, _ismbcprint_l, _ismbcpunct, _ismbcpunct_l, _ismbcblank, _ismbcblank_l, _ismbcspace, _ismbcspace_l Spazio vuotoWhite-space
Isupper, iswupper, _ismbclower, _ismbclower_l, _ismbcupper, _ismbcupper_lIsupper, iswupper, _ismbclower, _ismbclower_l, _ismbcupper, _ismbcupper_l MaiuscoleUppercase
_isctype, iswctype, _isctype_l, _iswctype_l_isctype, iswctype, _isctype_l, _iswctype_l Proprietà specificata dall'argomento descProperty specified by desc argument
isxdigit, iswxdigit, _isxdigit_l, _iswxdigit_lisxdigit, iswxdigit, _isxdigit_l, _iswxdigit_l Cifra esadecimaleHexadecimal digit
_mbclen, mblen, _mblen_l_mbclen, mblen, _mblen_l Restituisce la lunghezza del carattere multibyte valido. Il risultato dipende dall'impostazione della categoria LC_CTYPE all'interno delle impostazioni locali correntiReturn length of valid multibyte character; result depends on LC_CTYPE category setting of current locale

Vedere ancheSee Also

Routine di runtime per categoriaRun-Time Routines by Category