1string.h(0P) POSIX Programmer's Manual string.h(0P)
2
3
4
6 This manual page is part of the POSIX Programmer's Manual. The Linux
7 implementation of this interface may differ (consult the corresponding
8 Linux manual page for details of Linux behavior), or the interface may
9 not be implemented on Linux.
10
11
13 string.h — string operations
14
16 #include <string.h>
17
19 Some of the functionality described on this reference page extends the
20 ISO C standard. Applications shall define the appropriate feature test
21 macro (see the System Interfaces volume of POSIX.1‐2008, Section 2.2,
22 The Compilation Environment) to enable the visibility of these symbols
23 in this header.
24
25 The <string.h> header shall define NULL and size_t as described in
26 <stddef.h>.
27
28 The <string.h> header shall define the locale_t type as described in
29 <locale.h>.
30
31 The following shall be declared as functions and may also be defined as
32 macros. Function prototypes shall be provided for use with ISO C stan‐
33 dard compilers.
34
35 void *memccpy(void *restrict, const void *restrict, int, size_t);
36 void *memchr(const void *, int, size_t);
37 int memcmp(const void *, const void *, size_t);
38 void *memcpy(void *restrict, const void *restrict, size_t);
39 void *memmove(void *, const void *, size_t);
40 void *memset(void *, int, size_t);
41 char *stpcpy(char *restrict, const char *restrict);
42 char *stpncpy(char *restrict, const char *restrict, size_t);
43 char *strcat(char *restrict, const char *restrict);
44 char *strchr(const char *, int);
45 int strcmp(const char *, const char *);
46 int strcoll(const char *, const char *);
47 int strcoll_l(const char *, const char *, locale_t);
48 char *strcpy(char *restrict, const char *restrict);
49 size_t strcspn(const char *, const char *);
50 char *strdup(const char *);
51 char *strerror(int);
52 char *strerror_l(int, locale_t);
53 int strerror_r(int, char *, size_t);
54 size_t strlen(const char *);
55 char *strncat(char *restrict, const char *restrict, size_t);
56 int strncmp(const char *, const char *, size_t);
57 char *strncpy(char *restrict, const char *restrict, size_t);
58 char *strndup(const char *, size_t);
59 size_t strnlen(const char *, size_t);
60 char *strpbrk(const char *, const char *);
61 char *strrchr(const char *, int);
62 char *strsignal(int);
63 size_t strspn(const char *, const char *);
64 char *strstr(const char *, const char *);
65 char *strtok(char *restrict, const char *restrict);
66 char *strtok_r(char *restrict, const char *restrict, char **restrict);
67 size_t strxfrm(char *restrict, const char *restrict, size_t);
68 size_t strxfrm_l(char *restrict, const char *restrict,
69 size_t, locale_t);
70
71 Inclusion of the <string.h> header may also make visible all symbols
72 from <stddef.h>.
73
74 The following sections are informative.
75
77 None.
78
80 None.
81
83 None.
84
86 <locale.h>, <stddef.h>, <sys_types.h>
87
88 The System Interfaces volume of POSIX.1‐2008, Section 2.2, The Compila‐
89 tion Environment, memccpy(), memchr(), memcmp(), memcpy(), memmove(),
90 memset(), strcat(), strchr(), strcmp(), strcoll(), strcpy(), strcspn(),
91 strdup(), strerror(), strlen(), strncat(), strncmp(), strncpy(), strp‐
92 brk(), strrchr(), strsignal(), strspn(), strstr(), strtok(), strxfrm()
93
95 Portions of this text are reprinted and reproduced in electronic form
96 from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
97 -- Portable Operating System Interface (POSIX), The Open Group Base
98 Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
99 cal and Electronics Engineers, Inc and The Open Group. (This is
100 POSIX.1-2008 with the 2013 Technical Corrigendum 1 applied.) In the
101 event of any discrepancy between this version and the original IEEE and
102 The Open Group Standard, the original IEEE and The Open Group Standard
103 is the referee document. The original Standard can be obtained online
104 at http://www.unix.org/online.html .
105
106 Any typographical or formatting errors that appear in this page are
107 most likely to have been introduced during the conversion of the source
108 files to man page format. To report such errors, see https://www.ker‐
109 nel.org/doc/man-pages/reporting_bugs.html .
110
111
112
113IEEE/The Open Group 2013 string.h(0P)