1 .\" Copyright (c) 1980 Regents of the University of California.
2 .\" All rights reserved. The Berkeley software License Agreement
3 .\" specifies the terms and conditions for redistribution.
5 .\" @(#)string.3 6.1 (Berkeley) 5/15/85
7 .TH STRING 3 "May 15, 1985"
10 string, strcat, strncat, strcmp, strncmp, strcpy, strncpy, strlen, strchr, strrchr, strerror, memcmp, memcpy, memmove, memchr, memset, index, rindex \- string operations
16 char *strcat(char *\fIs1\fP, const char *\fIs2\fP)
17 char *strncat(char *\fIs1\fP, const char *\fIs2\fP, size_t \fIn\fP)
18 int strcmp(const char *\fIs1\fP, const char *\fIs2\fP)
19 int strncmp(const char *\fIs1\fP, const char *\fIs2\fP, size_t \fIn\fP)
20 char *strcpy(char *\fIs1\fP, const char *\fIs2\fP)
21 char *strncpy(char *\fIs1\fP, const char *\fIs2\fP, size_t \fIn\fP)
22 size_t strlen(const char *\fIs\fP)
23 char *strchr(const char *\fIs\fP, int \fIc\fP)
24 char *strrchr(const char *\fIs\fP, int \fIc\fP)
25 char *strerror(int \fIerrnum\fP)
26 int memcmp(const void *\fIs1\fP, const void *\fIs2\fP, size_t \fIn\fP)
27 void *memcpy(void *\fIs1\fP, const void *\fIs2\fP, size_t \fIn\fP)
28 void *memmove(void *\fIs1\fP, const void *\fIs2\fP, size_t \fIn\fP)
29 void *memchr(const void *\fIs\fP, int \fIc\fP, size_t \fIn\fP)
30 void *memset(void *\fIs\fP, int \fIc\fP, size_t \fIn\fP)
31 char *index(const char *\fIs\fP, int \fIc\fP)
32 char *rindex(const char *\fIs\fP, int \fIc\fP)
36 These functions operate on null-terminated strings.
37 They do not check for overflow of any receiving string.
40 appends a copy of string
47 characters. Both return a pointer to the null-terminated result.
50 compares its arguments and returns an integer
51 greater than, equal to, or less than 0, according as
53 is lexicographically greater than, equal to, or less than
56 makes the same comparison but looks at at most
65 stopping after the null character has been moved.
69 characters, truncating or null-padding
71 the target may not be null-terminated if the length of
79 returns the number of non-null characters in
84 returns a pointer to the first (last) occurrence of character
90 does not occur in the string.
93 returns the error string for the system call error
101 except that the strings are memory blocks of length
103 Null characters are treated as ordinary characters.
108 bytes from the location pointed to by
113 is like memcpy, except that it can handle overlap between the two strings.
114 Both functions return
118 returns a pointer to the first occurrence of character
124 does not occur in the string.
139 are obsolete versions of
143 New code should avoid using them.
145 Characters are compared as
146 .BR "unsigned char" ,
149 itself is signed or not.