Tables [tab:strings.hdr.cctype], [tab:strings.hdr.cwctype], [tab:strings.hdr.cstring], [tab:strings.hdr.cwchar], [tab:strings.hdr.cstdlib], and [tab:strings.hdr.cuchar] describe headers <cctype>, <cwctype>, <cstring>, <cwchar>, <cstdlib> (character conversions), and <cuchar>, respectively.
The contents of these headers shall be the same as the Standard C Library headers <ctype.h>, <wctype.h>, <string.h>, <wchar.h>, and <stdlib.h> and the C Unicode TR header <uchar.h>, respectively, with the following modifications:
The function signature strchr(const char*, int) shall be replaced by the two declarations:
const char* strchr(const char* s, int c); char* strchr( char* s, int c);
both of which shall have the same behavior as the original declaration.
The function signature strpbrk(const char*, const char*) shall be replaced by the two declarations:
const char* strpbrk(const char* s1, const char* s2); char* strpbrk( char* s1, const char* s2);
both of which shall have the same behavior as the original declaration.
The function signature strrchr(const char*, int) shall be replaced by the two declarations:
const char* strrchr(const char* s, int c); char* strrchr( char* s, int c);
both of which shall have the same behavior as the original declaration.
The function signature strstr(const char*, const char*) shall be replaced by the two declarations:
const char* strstr(const char* s1, const char* s2); char* strstr( char* s1, const char* s2);
both of which shall have the same behavior as the original declaration.
The function signature memchr(const void*, int, size_t) shall be replaced by the two declarations:
const void* memchr(const void* s, int c, size_t n); void* memchr( void* s, int c, size_t n);
both of which shall have the same behavior as the original declaration.
The function signature wcschr(const wchar_t*, wchar_t) shall be replaced by the two declarations:
const wchar_t* wcschr(const wchar_t* s, wchar_t c); wchar_t* wcschr( wchar_t* s, wchar_t c);
both of which shall have the same behavior as the original declaration.
The function signature wcspbrk(const wchar_t*, const wchar_t*) shall be replaced by the two declarations:
const wchar_t* wcspbrk(const wchar_t* s1, const wchar_t* s2); wchar_t* wcspbrk( wchar_t* s1, const wchar_t* s2);
both of which shall have the same behavior as the original declaration.
The function signature wcsrchr(const wchar_t*, wchar_t) shall be replaced by the two declarations:
const wchar_t* wcsrchr(const wchar_t* s, wchar_t c); wchar_t* wcsrchr( wchar_t* s, wchar_t c);
both of which shall have the same behavior as the original declaration.
The function signature wcsstr(const wchar_t*, const wchar_t*) shall be replaced by the two declarations:
const wchar_t* wcsstr(const wchar_t* s1, const wchar_t* s2); wchar_t* wcsstr( wchar_t* s1, const wchar_t* s2);
both of which shall have the same behavior as the original declaration.
The function signature wmemchr(const wwchar_t*, int, size_t) shall be replaced by the two declarations:
const wchar_t* wmemchr(const wchar_t* s, wchar_t c, size_t n); wchar_t* wmemchr( wchar_t* s, wchar_t c, size_t n);
both of which shall have the same behavior as the original declaration.
The functions strerror and strtok are not required to avoid data races ([res.on.data.races]).
Calling the functions listed in Table [tab:mbstate.data.races] with an mbstate_t* argument of NULL may introduce a data race ([res.on.data.races]) with other calls to these functions with an mbstate_t* argument of NULL.
See also: ISO C 7.3, 7.10.7, 7.10.8, and 7.11. Amendment 1 4.4, 4.5, and 4.6.
Type | Name(s) | |||
Functions: | ||||
isalnum | isblank | isdigit | isprint | isupper |
tolower | isalpha | isgraph | ispunct | isxdigit |
toupper | iscntrl | islower | isspace |
Type | Name(s) | |||
Macro: | WEOF | |||
Types: | wctrans_t | wctype_t | wint_t | |
Functions: | ||||
iswalnum | iswctype | iswprint | iswxdigit | wctrans |
iswalpha | iswdigit | iswpunct | towctrans | wctype |
iswblank | iswgraph | iswspace | towlower | |
iswcntrl | iswlower | iswupper | towupper |
Type | Name(s) | |||
Macro: | NULL <cstring> | |||
Type: | size_t <cstring> | |||
Functions: | ||||
memchr | strcat | strcspn | strncpy | strtok |
memcmp | strchr | strerror | strpbrk | strxfrm |
memcpy | strcmp | strlen | strrchr | |
memmove | strcoll | strncat | strspn | |
memset | strcpy | strncmp | strstr |
Type | Name(s) | |||
Macros: | NULL | WCHAR_MAX | WCHAR_MIN | WEOF |
Types: | mbstate_t | wint_t | size_t | tm |
Functions: | ||||
btowc | mbsinit | vwscanf | wcsncpy | wcstoull |
fgetwc | mbsrtowcs | wcrtomb | wcspbrk | wcstoul |
fgetws | putwchar | wcscat | wcsrchr | wcsxfrm |
fputwc | putwc | wcschr | wcsrtombs | wctob |
fputws | swprintf | wcscmp | wcsspn | wmemchr |
fwide | swscanf | wcscoll | wcsstr | wmemcmp |
fwprintf | ungetwc | wcscpy | wcstod | wmemcpy |
fwscanf | vfwprintf | wcscspn | wcstof | wmemmove |
getwchar | vfwscanf | wcsftime | wcstok | wmemset |
getwc | vswprintf | wcslen | wcstold | wprintf |
mbrlen | vswscanf | wcsncat | wcstoll | wscanf |
mbrtowc | vwprintf | wcsncmp | wcstol |
Type | Name(s) | ||
Macros: | MB_CUR_MAX | ||
Functions: | |||
atof | mblen | strtof | strtoul |
atoi | mbtowc | strtol | strtoull |
atol | mbstowcs | strtold | wctomb |
atoll | strtod | strtoll | wcstombs |
Type | Name(s) | |
Macros: | __STDC_UTF_16__ | |
__STDC_UTF_32__ | ||
Functions: | mbrtoc16 | c16rtomb |
mbrtoc32 | c32rtomb |