21.5 Null-terminated sequence utilities [c.strings]
namespace std {
using size_t = see [support.types.layout];
void* memcpy(void* s1, const void* s2, size_t n);
void* memmove(void* s1, const void* s2, size_t n);
char* strcpy(char* s1, const char* s2);
char* strncpy(char* s1, const char* s2, size_t n);
char* strcat(char* s1, const char* s2);
char* strncat(char* s1, const char* s2, size_t n);
int memcmp(const void* s1, const void* s2, size_t n);
int strcmp(const char* s1, const char* s2);
int strcoll(const char* s1, const char* s2);
int strncmp(const char* s1, const char* s2, size_t n);
size_t strxfrm(char* s1, const char* s2, size_t n);
const void* memchr(const void* s, int c, size_t n);
void* memchr(void* s, int c, size_t n);
const char* strchr(const char* s, int c);
char* strchr(char* s, int c);
size_t strcspn(const char* s1, const char* s2);
const char* strpbrk(const char* s1, const char* s2);
char* strpbrk(char* s1, const char* s2);
const char* strrchr(const char* s, int c);
char* strrchr(char* s, int c);
size_t strspn(const char* s1, const char* s2);
const char* strstr(const char* s1, const char* s2);
char* strstr(char* s1, const char* s2);
char* strtok(char* s1, const char* s2);
void* memset(void* s, int c, size_t n);
char* strerror(int errnum);
size_t strlen(const char* s);
}
#define NULL see [support.types.nullptr]
The contents and meaning of the header
<cstring>
are the same as the C standard library header
<string.h>. Both functions implicitly create objects (
[intro.object])
in the destination region of storage
immediately prior to copying the sequence of characters to the destination
. [
Note: The functions
strchr,
strpbrk,
strrchr,
strstr, and
memchr,
have different signatures in this document,
but they have the same behavior as in the
C standard library. —
end note ]
See also: ISO C 7.24