isspace, iswspace, _isspace_l, _iswspace_l
Determines if a particular character represents a space character.
int isspace( int c ); int iswspace( wint_t c ); int _isspace_l( int c, _locale_t locale ); int _iswspace_l( wint_t c, _locale_t locale );
Parameters
- c
-
Integer to test.
- locale
-
Locale to use.
Each of these routines returns nonzero if c is a particular representation of a space character. isspace returns a nonzero value if c is a white-space character (0x09 – 0x0D or 0x20). The result of the test condition for the isspace function depends on the LC_CTYPE category setting of the locale; see setlocale for more information. The versions of these functions without the _l suffix use the current locale for any locale-dependent behavior; the versions with the _l suffix are identical except that they use the locale passed in instead.
iswspace returns a nonzero value if c is a wide character that corresponds to a standard white-space character.
When used with a debug CRT library, isspace will display a CRT assert if passed a parameter that is not EOF or in the range of 0 through 0xFF. When used with a non-debug CRT library, isspace will use the parameter as an index into an array, with undefined results if the parameter is not EOF or in the range of 0 through 0xFF.
| TCHAR.H routine | _UNICODE & _MBCS not defined | _MBCS defined | _UNICODE defined |
|---|---|---|---|
| _ istspace | isspace | iswspace |
| Routine | Required header | Compatibility |
|---|---|---|
| isspace | <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 |
| iswspace | <ctype.h> or <wchar.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 |
| _isspace_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 |
| _iswspace_l | <ctype.h> or <wchar.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.