1string.h(0P)               POSIX Programmer's Manual              string.h(0P)
2
3
4

PROLOG

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

NAME

12       string.h — string operations
13

SYNOPSIS

15       #include <string.h>
16

DESCRIPTION

18       Some of the functionality described on this reference page extends  the
19       ISO C  standard. Applications shall define the appropriate feature test
20       macro (see the System Interfaces volume of POSIX.1‐2017,  Section  2.2,
21       The  Compilation Environment) to enable the visibility of these symbols
22       in this header.
23
24       The <string.h> header shall define NULL  and  size_t  as  described  in
25       <stddef.h>.
26
27       The  <string.h>  header  shall define the locale_t type as described in
28       <locale.h>.
29
30       The following shall be declared as functions and may also be defined as
31       macros.  Function prototypes shall be provided for use with ISO C stan‐
32       dard compilers.
33
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

APPLICATION USAGE

77       None.
78

RATIONALE

80       None.
81

FUTURE DIRECTIONS

83       None.
84

SEE ALSO

86       <locale.h>, <stddef.h>, <sys_types.h>
87
88       The System Interfaces volume of POSIX.1‐2017, 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-2017, Standard for Information Technology --  Por‐
97       table  Operating System Interface (POSIX), The Open Group Base Specifi‐
98       cations Issue 7, 2018 Edition, Copyright (C) 2018 by the  Institute  of
99       Electrical  and  Electronics Engineers, Inc and The Open Group.  In the
100       event of any discrepancy between this version and the original IEEE and
101       The  Open Group Standard, the original IEEE and The Open Group Standard
102       is the referee document. The original Standard can be  obtained  online
103       at http://www.opengroup.org/unix/online.html .
104
105       Any  typographical  or  formatting  errors that appear in this page are
106       most likely to have been introduced during the conversion of the source
107       files  to  man page format. To report such errors, see https://www.ker
108       nel.org/doc/man-pages/reporting_bugs.html .
109
110
111
112IEEE/The Open Group                  2017                         string.h(0P)
Impressum