__iscsym, __iswcsym, __iscsymf, __iswcsymf, _iscsym_l, _iswcsym_l, _iscsymf_l, _iswcsymf_l
Determine if an integer represents a character that may be used in an identifier.
int __iscsym( int c ); int __iswcsym( wint_t c ); int __iscsymf( int c ); int __iswcsymf( wint_t c ); int _iscsym_l( int c, _locale_t locale ); int _iswcsym_l( wint_t c, _locale_t locale ); int _iscsymf_l( int c, _locale_t locale ); int _iswcsymf_l( wint_t c, _locale_t locale );
Parameters
- c
-
Integer to test. c should be in the range of 0-255 for the narrow character version of the function.
- locale
-
The locale to use.
__iscsym returns a nonzero value if c is a letter, underscore, or digit. __iscsymf returns a nonzero value if c is a letter or an underscore. Each of these routines returns 0 if c does not satisfy the test condition. Both of these routines are macros, so be careful using expressions with side effects within the argument list; the arguments will be evaluated more than once.
The versions of these functions with the _l suffix are identical except that they use the locale passed in instead of the current locale for their locale-dependent behavior.
In Visual C++ 2005, the wide character versions of these macros are available.
The following table shows the equivalent expressions for each of these macros:
| Macro | Equivalent |
|---|---|
| __iscsym(c) | (isalnum(c) || ((c) == '_')) |
| __iswcsym(c) | (iswalnum(c) || ((c) == '_')) |
| __iscsymf(c) | (isalpha(c) || ((c) == '_')) |
| __iswcsymf(c) | (iswalpha(c) || ((c) == '_')) |
| Routine | Required header | Compatibility |
|---|---|---|
| __iscsym | <ctype.h> | ANSI, Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 |
| __iswcsym | <ctype.h> | Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 |
| __iscsymf | <ctype.h> | Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 |
| __iswcsymf | <ctype.h> | Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 |
| _iscsym_l | <ctype.h> | Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 |
| _iswcsym_l | <ctype.h> | Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 |
| _iscsymf_l | <ctype.h> | Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 |
| _iswcsymf_l | <ctype.h> | Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 |
For additional compatibility information, see Compatibility in the Introduction.