add directory Minix

This commit is contained in:
gohigh
2024-02-19 00:21:39 -05:00
parent 56596ada90
commit 5a46ddb732
2923 changed files with 1764412 additions and 0 deletions

View File

@@ -0,0 +1,119 @@
<HTML>
<HEAD>
<TITLE>string(3)</TITLE>
</HEAD>
<BODY>
<H1>string(3)</H1>
<HR>
<PRE>
</PRE>
<H2>NAME</H2><PRE>
string, strcat, strncat, strcmp, strncmp, strcpy, strncpy, strlen, index,
rindex - string operations string, strcat, strncat, strcmp, strncmp,
strcpy, strncpy, strlen, strchr, strrchr, strerror, memcmp, memcpy,
memmove, memchr, memset, index, rindex - string operations
</PRE>
<H2>SYNOPSIS</H2><PRE>
<STRONG>#include</STRONG> <STRONG>&lt;sys/types.h&gt;</STRONG>
<STRONG>#include</STRONG> <STRONG>&lt;strings.h&gt;</STRONG>
<STRONG>char</STRONG> <STRONG>*strcat(char</STRONG> <STRONG>*</STRONG><EM>s1</EM><STRONG>,</STRONG> <STRONG>const</STRONG> <STRONG>char</STRONG> <STRONG>*</STRONG><EM>s2</EM><STRONG>)</STRONG>
<STRONG>char</STRONG> <STRONG>*strncat(char</STRONG> <STRONG>*</STRONG><EM>s1</EM><STRONG>,</STRONG> <STRONG>const</STRONG> <STRONG>char</STRONG> <STRONG>*</STRONG><EM>s2</EM><STRONG>,</STRONG> <STRONG>size_t</STRONG> <EM>n</EM><STRONG>)</STRONG>
<STRONG>int</STRONG> <STRONG>strcmp(const</STRONG> <STRONG>char</STRONG> <STRONG>*</STRONG><EM>s1</EM><STRONG>,</STRONG> <STRONG>const</STRONG> <STRONG>char</STRONG> <STRONG>*</STRONG><EM>s2</EM><STRONG>)</STRONG>
<STRONG>int</STRONG> <STRONG>strncmp(const</STRONG> <STRONG>char</STRONG> <STRONG>*</STRONG><EM>s1</EM><STRONG>,</STRONG> <STRONG>const</STRONG> <STRONG>char</STRONG> <STRONG>*</STRONG><EM>s2</EM><STRONG>,</STRONG> <STRONG>size_t</STRONG> <EM>n</EM><STRONG>)</STRONG>
<STRONG>char</STRONG> <STRONG>*strcpy(char</STRONG> <STRONG>*</STRONG><EM>s1</EM><STRONG>,</STRONG> <STRONG>const</STRONG> <STRONG>char</STRONG> <STRONG>*</STRONG><EM>s2</EM><STRONG>)</STRONG>
<STRONG>char</STRONG> <STRONG>*strncpy(char</STRONG> <STRONG>*</STRONG><EM>s1</EM><STRONG>,</STRONG> <STRONG>const</STRONG> <STRONG>char</STRONG> <STRONG>*</STRONG><EM>s2</EM><STRONG>,</STRONG> <STRONG>size_t</STRONG> <EM>n</EM><STRONG>)</STRONG>
<STRONG>size_t</STRONG> <STRONG>strlen(const</STRONG> <STRONG>char</STRONG> <STRONG>*</STRONG><EM>s</EM><STRONG>)</STRONG>
<STRONG>char</STRONG> <STRONG>*strchr(const</STRONG> <STRONG>char</STRONG> <STRONG>*</STRONG><EM>s</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>c</EM><STRONG>)</STRONG>
<STRONG>char</STRONG> <STRONG>*strrchr(const</STRONG> <STRONG>char</STRONG> <STRONG>*</STRONG><EM>s</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>c</EM><STRONG>)</STRONG>
<STRONG>char</STRONG> <STRONG>*strerror(int</STRONG> <EM>errnum</EM><STRONG>)</STRONG>
<STRONG>int</STRONG> <STRONG>memcmp(const</STRONG> <STRONG>void</STRONG> <STRONG>*</STRONG><EM>s1</EM><STRONG>,</STRONG> <STRONG>const</STRONG> <STRONG>void</STRONG> <STRONG>*</STRONG><EM>s2</EM><STRONG>,</STRONG> <STRONG>size_t</STRONG> <EM>n</EM><STRONG>)</STRONG>
<STRONG>void</STRONG> <STRONG>*memcpy(void</STRONG> <STRONG>*</STRONG><EM>s1</EM><STRONG>,</STRONG> <STRONG>const</STRONG> <STRONG>void</STRONG> <STRONG>*</STRONG><EM>s2</EM><STRONG>,</STRONG> <STRONG>size_t</STRONG> <EM>n</EM><STRONG>)</STRONG>
<STRONG>void</STRONG> <STRONG>*memmove(void</STRONG> <STRONG>*</STRONG><EM>s1</EM><STRONG>,</STRONG> <STRONG>const</STRONG> <STRONG>void</STRONG> <STRONG>*</STRONG><EM>s2</EM><STRONG>,</STRONG> <STRONG>size_t</STRONG> <EM>n</EM><STRONG>)</STRONG>
<STRONG>void</STRONG> <STRONG>*memchr(const</STRONG> <STRONG>void</STRONG> <STRONG>*</STRONG><EM>s</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>c</EM><STRONG>,</STRONG> <STRONG>size_t</STRONG> <EM>n</EM><STRONG>)</STRONG>
<STRONG>void</STRONG> <STRONG>*memset(void</STRONG> <STRONG>*</STRONG><EM>s</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>c</EM><STRONG>,</STRONG> <STRONG>size_t</STRONG> <EM>n</EM><STRONG>)</STRONG>
<STRONG>char</STRONG> <STRONG>*index(const</STRONG> <STRONG>char</STRONG> <STRONG>*</STRONG><EM>s</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>c</EM><STRONG>)</STRONG>
<STRONG>char</STRONG> <STRONG>*rindex(const</STRONG> <STRONG>char</STRONG> <STRONG>*</STRONG><EM>s</EM><STRONG>,</STRONG> <STRONG>int</STRONG> <EM>c</EM><STRONG>)</STRONG>
</PRE>
<H2>DESCRIPTION</H2><PRE>
These functions operate on null-terminated strings. They do not check
for overflow of any receiving string.
<STRONG>Strcat</STRONG> appends a copy of string <EM>s2</EM> to the end of string <EM>s1</EM>. <STRONG>Strncat</STRONG>
copies at most <EM>n</EM> characters. Both return a pointer to the null-
terminated result.
<STRONG>Strcmp</STRONG> compares its arguments and returns an integer greater than, equal
to, or less than 0, according as <EM>s1</EM> is lexicographically greater than,
equal to, or less than <EM>s2</EM>. <STRONG>Strncmp</STRONG> makes the same comparison but looks
at at most <EM>n</EM> characters.
<STRONG>Strcpy</STRONG> copies string <EM>s2</EM> to <EM>s1</EM>, stopping after the null character has been
moved. <STRONG>Strncpy</STRONG> copies exactly <EM>n</EM> characters, truncating or null-padding
<EM>s2</EM>; the target may not be null-terminated if the length of <EM>s2</EM> is <EM>n</EM> or
more. Both return <EM>s1</EM>.
<STRONG>Strlen</STRONG> returns the number of non-null characters in <EM>s</EM>.
<STRONG>Strchr</STRONG> (<STRONG>strrchr</STRONG>) returns a pointer to the first (last) occurrence of
character <EM>c</EM> in string <EM>s</EM>, or null if <EM>c</EM> does not occur in the string.
<STRONG>Strerror</STRONG> returns the error string for the system call error <EM>errnum</EM>. See
<STRONG><A HREF="../man2/intro.2.html">intro(2)</A></STRONG>.
<STRONG>Memcmp</STRONG> is like <STRONG>strcmp</STRONG> except that the strings are memory blocks of length
<EM>n</EM>. Null characters are treated as ordinary characters.
<STRONG>Memcpy</STRONG> copies <EM>n</EM> bytes from the location pointed to by <EM>s2</EM> to <EM>s1</EM>. <STRONG>Memmove</STRONG>
is like memcpy, except that it can handle overlap between the two
strings. Both functions return <EM>s1</EM>.
<STRONG>Memchr</STRONG> returns a pointer to the first occurrence of character <EM>c</EM> in string
<EM>s</EM>, or null if <EM>c</EM> does not occur in the string.
<STRONG>Memset</STRONG> sets <EM>n</EM> bytes to <EM>c</EM> starting at location <EM>s</EM>. It returns <EM>s</EM>.
<STRONG>Index</STRONG> and <STRONG>rindex</STRONG> are obsolete versions of <STRONG>strchr</STRONG> and <STRONG>strrchr</STRONG>. New code
should avoid using them.
</PRE>
<H2>NOTES</H2><PRE>
Characters are compared as <STRONG>unsigned</STRONG> <STRONG>char</STRONG>, whether <STRONG>char</STRONG> itself is signed
or not.
</PRE>
</BODY>
</HTML>