The Open Group Base Specifications Issue 6
IEEE Std 1003.1, 2004 Edition
Copyright © 2001-2004 The IEEE and The Open Group, All Rights reserved.

NAME

string.h - string operations

SYNOPSIS

#include <string.h>

DESCRIPTION

[CX] [Option Start] Some of the functionality described on this reference page extends the ISO C standard. Applications shall define the appropriate feature test macro (see the System Interfaces volume of IEEE Std 1003.1-2001, Section 2.2, The Compilation Environment) to enable the visibility of these symbols in this header. [Option End]

The <string.h> header shall define the following:

NULL
Null pointer constant.
size_t
As described in <stddef.h>.

The following shall be declared as functions and may also be defined as macros. Function prototypes shall be provided.

[XSI][Option Start]
void    *memccpy(void *restrict, const void *restrict, int, size_t);
[Option End]
void    *memchr(const void *, int, size_t);
int      memcmp(const void *, const void *, size_t);
void    *memcpy(void *restrict, const void *restrict, size_t);
void    *memmove(void *, const void *, size_t);
void    *memset(void *, int, size_t);
char    *strcat(char *restrict, const char *restrict);
char    *strchr(const char *, int);
int      strcmp(const char *, const char *);
int      strcoll(const char *, const char *);
char    *strcpy(char *restrict, const char *restrict);
size_t   strcspn(const char *, const char *);
[XSI][Option Start]
char    *strdup(const char *);
[Option End]
char    *strerror(int);
[TSF][Option Start]
int     *strerror_r(int, char *, size_t);
[Option End]
size_t   strlen(const char *);
char    *strncat(char *restrict, const char *restrict, size_t);
int      strncmp(const char *, const char *, size_t);
char    *strncpy(char *restrict, const char *restrict, size_t);
char    *strpbrk(const char *, const char *);
char    *strrchr(const char *, int);
size_t   strspn(const char *, const char *);
char    *strstr(const char *, const char *);
char    *strtok(char *restrict, const char *restrict);
[TSF][Option Start]
char    *strtok_r(char *, const char *, char **);
[Option End]
size_t   strxfrm(char *restrict, const char *restrict, size_t);

[XSI] [Option Start] Inclusion of the <string.h> header may also make visible all symbols from <stddef.h>. [Option End]


The following sections are informative.

APPLICATION USAGE

None.

RATIONALE

None.

FUTURE DIRECTIONS

None.

SEE ALSO

<stddef.h>, <sys/types.h>, the System Interfaces volume of IEEE Std 1003.1-2001, memccpy(), memchr(), memcmp(), memcpy(), memmove(), memset(), strcat(), strchr(), strcmp(), strcoll(), strcpy(), strcspn(), strdup(), strerror(), strlen(), strncat(), strncmp(), strncpy(), strpbrk(), strrchr(), strspn(), strstr(), strtok(), strxfrm()

CHANGE HISTORY

First released in Issue 1. Derived from Issue 1 of the SVID.

Issue 5

The DESCRIPTION is updated for alignment with the POSIX Threads Extension.

Issue 6

The strtok_r() function is marked as part of the Thread-Safe Functions option.

This reference page is updated to align with the ISO/IEC 9899:1999 standard.

The strerror_r() function is added in response to IEEE PASC Interpretation 1003.1c #39.

End of informative text.

UNIX ® is a registered Trademark of The Open Group.
POSIX ® is a registered Trademark of The IEEE.
[ Main Index | XBD | XCU | XSH | XRAT ]