Files
oldlinux-files/Ref-docs/POSIX/susv3/basedefs/string.h.html
2024-02-19 00:21:47 -05:00

178 lines
7.6 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta name="generator" content="HTML Tidy, see www.w3.org">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 -->
<!-- Copyright (c) 2001 The Open Group, All Rights Reserved -->
<title>&lt;string.h&gt;</title>
</head>
<body bgcolor="white">
<script type="text/javascript" language="JavaScript" src="../jscript/codes.js">
</script>
<basefont size="3"> <a name="&lt;string.h&gt;"></a> <a name="tag_13_51"></a><!-- &lt;string.h&gt; -->
<!--header start-->
<center><font size="2">The Open Group Base Specifications Issue 6<br>
IEEE Std 1003.1-2001<br>
Copyright &copy; 2001 The IEEE and The Open Group, All Rights reserved.</font></center>
<!--header end-->
<hr size="2" noshade>
<h4><a name="tag_13_51_01"></a>NAME</h4>
<blockquote>string.h - string operations</blockquote>
<h4><a name="tag_13_51_02"></a>SYNOPSIS</h4>
<blockquote class="synopsis">
<p><tt>#include &lt;string.h&gt;</tt></p>
</blockquote>
<h4><a name="tag_13_51_03"></a>DESCRIPTION</h4>
<blockquote>
<div class="box"><sup>[<a href="javascript:open_code('CX')">CX</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]"
border="0"> Some of the functionality described on this reference page extends the ISO&nbsp;C standard. Applications shall define
the appropriate feature test macro (see the System Interfaces volume of IEEE&nbsp;Std&nbsp;1003.1-2001, <a href=
"../functions/xsh_chap02_02.html">Section 2.2, The Compilation Environment</a>) to enable the visibility of these symbols in this
header. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></div>
<p>The <i>&lt;string.h&gt;</i> header shall define the following:</p>
<dl compact>
<dt>NULL</dt>
<dd>Null pointer constant.</dd>
<dt><b>size_t</b></dt>
<dd>As described in <a href="stddef.h.html"><i>&lt;stddef.h&gt;</i></a> .</dd>
</dl>
<p>The following shall be declared as functions and may also be defined as macros. Function prototypes shall be provided.</p>
<pre>
<tt><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup><img src="../images/opt-start.gif" alt="[Option Start]" border="0">
void *memccpy(void *restrict, const void *restrict, int, size_t);
<img src="../images/opt-end.gif" alt="[Option End]" border="0">
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 *);
<sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup><img src="../images/opt-start.gif" alt="[Option Start]" border="0">
char *strdup(const char *);
<img src="../images/opt-end.gif" alt="[Option End]" border="0">
char *strerror(int);
<sup>[<a href="javascript:open_code('TSF')">TSF</a>]</sup><img src="../images/opt-start.gif" alt="[Option Start]" border="0">
int *strerror_r(int, char *, size_t);
<img src="../images/opt-end.gif" alt="[Option End]" border="0">
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);
<sup>[<a href="javascript:open_code('TSF')">TSF</a>]</sup><img src="../images/opt-start.gif" alt="[Option Start]" border="0">
char *strtok_r(char *, const char *, char **);
<img src="../images/opt-end.gif" alt="[Option End]" border="0">
size_t strxfrm(char *restrict, const char *restrict, size_t);
</tt>
</pre>
<p><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
Inclusion of the <i>&lt;string.h&gt;</i> header may also make visible all symbols from <a href=
"../basedefs/stddef.h.html"><i>&lt;stddef.h&gt;</i></a>. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></p>
</blockquote>
<hr>
<div class="box"><em>The following sections are informative.</em></div>
<h4><a name="tag_13_51_04"></a>APPLICATION USAGE</h4>
<blockquote>
<p>None.</p>
</blockquote>
<h4><a name="tag_13_51_05"></a>RATIONALE</h4>
<blockquote>
<p>None.</p>
</blockquote>
<h4><a name="tag_13_51_06"></a>FUTURE DIRECTIONS</h4>
<blockquote>
<p>None.</p>
</blockquote>
<h4><a name="tag_13_51_07"></a>SEE ALSO</h4>
<blockquote>
<p><a href="stddef.h.html"><i>&lt;stddef.h&gt;</i></a> , <a href="sys/types.h.html"><i>&lt;sys/types.h&gt;</i></a> , the System
Interfaces volume of IEEE&nbsp;Std&nbsp;1003.1-2001, <a href="../functions/memccpy.html"><i>memccpy</i>()</a>, <a href=
"../functions/memchr.html"><i>memchr</i>()</a>, <a href="../functions/memcmp.html"><i>memcmp</i>()</a>, <a href=
"../functions/memcpy.html"><i>memcpy</i>()</a>, <a href="../functions/memmove.html"><i>memmove</i>()</a>, <a href=
"../functions/memset.html"><i>memset</i>()</a>, <a href="../functions/strcat.html"><i>strcat</i>()</a>, <a href=
"../functions/strchr.html"><i>strchr</i>()</a>, <a href="../functions/strcmp.html"><i>strcmp</i>()</a>, <a href=
"../functions/strcoll.html"><i>strcoll</i>()</a>, <a href="../functions/strcpy.html"><i>strcpy</i>()</a>, <a href=
"../functions/strcspn.html"><i>strcspn</i>()</a>, <a href="../functions/strdup.html"><i>strdup</i>()</a>, <a href=
"../functions/strerror.html"><i>strerror</i>()</a>, <a href="../functions/strlen.html"><i>strlen</i>()</a>, <a href=
"../functions/strncat.html"><i>strncat</i>()</a>, <a href="../functions/strncmp.html"><i>strncmp</i>()</a>, <a href=
"../functions/strncpy.html"><i>strncpy</i>()</a>, <a href="../functions/strpbrk.html"><i>strpbrk</i>()</a>, <a href=
"../functions/strrchr.html"><i>strrchr</i>()</a>, <a href="../functions/strspn.html"><i>strspn</i>()</a>, <a href=
"../functions/strstr.html"><i>strstr</i>()</a>, <a href="../functions/strtok.html"><i>strtok</i>()</a>, <a href=
"../functions/strxfrm.html"><i>strxfrm</i>()</a></p>
</blockquote>
<h4><a name="tag_13_51_08"></a>CHANGE HISTORY</h4>
<blockquote>
<p>First released in Issue 1. Derived from Issue 1 of the SVID.</p>
</blockquote>
<h4><a name="tag_13_51_09"></a>Issue 5</h4>
<blockquote>
<p>The DESCRIPTION is updated for alignment with the POSIX Threads Extension.</p>
</blockquote>
<h4><a name="tag_13_51_10"></a>Issue 6</h4>
<blockquote>
<p>The <a href="../functions/strtok_r.html"><i>strtok_r</i>()</a> function is marked as part of the Thread-Safe Functions
option.</p>
<p>This reference page is updated to align with the ISO/IEC&nbsp;9899:1999 standard.</p>
<p>The <a href="../functions/strerror_r.html"><i>strerror_r</i>()</a> function is added in response to IEEE PASC Interpretation
1003.1c #39.</p>
</blockquote>
<div class="box"><em>End of informative text.</em></div>
<hr>
<hr size="2" noshade>
<center><font size="2"><!--footer start-->
UNIX &reg; is a registered Trademark of The Open Group.<br>
POSIX &reg; is a registered Trademark of The IEEE.<br>
[ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href=
"../utilities/contents.html">XCU</a> | <a href="../functions/contents.html">XSH</a> | <a href="../xrat/contents.html">XRAT</a>
]</font></center>
<!--footer end-->
<hr size="2" noshade>
</body>
</html>