diff options
Diffstat (limited to 'src/lib/libc/string/string.3')
| -rw-r--r-- | src/lib/libc/string/string.3 | 64 |
1 files changed, 22 insertions, 42 deletions
diff --git a/src/lib/libc/string/string.3 b/src/lib/libc/string/string.3 index aaf97e0321..4d47ad444d 100644 --- a/src/lib/libc/string/string.3 +++ b/src/lib/libc/string/string.3 | |||
| @@ -11,11 +11,7 @@ | |||
| 11 | .\" 2. Redistributions in binary form must reproduce the above copyright | 11 | .\" 2. Redistributions in binary form must reproduce the above copyright |
| 12 | .\" notice, this list of conditions and the following disclaimer in the | 12 | .\" notice, this list of conditions and the following disclaimer in the |
| 13 | .\" documentation and/or other materials provided with the distribution. | 13 | .\" documentation and/or other materials provided with the distribution. |
| 14 | .\" 3. All advertising materials mentioning features or use of this software | 14 | .\" 3. Neither the name of the University nor the names of its contributors |
| 15 | .\" must display the following acknowledgement: | ||
| 16 | .\" This product includes software developed by the University of | ||
| 17 | .\" California, Berkeley and its contributors. | ||
| 18 | .\" 4. Neither the name of the University nor the names of its contributors | ||
| 19 | .\" may be used to endorse or promote products derived from this software | 15 | .\" may be used to endorse or promote products derived from this software |
| 20 | .\" without specific prior written permission. | 16 | .\" without specific prior written permission. |
| 21 | .\" | 17 | .\" |
| @@ -31,38 +27,20 @@ | |||
| 31 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 27 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
| 32 | .\" SUCH DAMAGE. | 28 | .\" SUCH DAMAGE. |
| 33 | .\" | 29 | .\" |
| 34 | .\" from: @(#)string.3 6.9 (Berkeley) 4/19/91 | 30 | .\" $OpenBSD: string.3,v 1.12 2007/05/31 19:19:32 jmc Exp $ |
| 35 | .\" $Id: string.3,v 1.1.1.1 1995/10/18 08:42:22 deraadt Exp $ | ||
| 36 | .\" | 31 | .\" |
| 37 | .Dd April 19, 1991 | 32 | .Dd $Mdocdate: May 31 2007 $ |
| 38 | .Dt STRING 3 | 33 | .Dt STRING 3 |
| 39 | .Os BSD 4 | 34 | .Os |
| 40 | .Sh NAME | 35 | .Sh NAME |
| 41 | .Nm strcat , | 36 | .Nm string |
| 42 | .Nm strncat , | ||
| 43 | .Nm strchr , | ||
| 44 | .Nm strrchr , | ||
| 45 | .Nm strcmp , | ||
| 46 | .Nm strncmp , | ||
| 47 | .Nm strcasecmp, | ||
| 48 | .Nm strncasecmp , | ||
| 49 | .Nm strcpy , | ||
| 50 | .Nm strncpy , | ||
| 51 | .Nm strerror , | ||
| 52 | .Nm strlen , | ||
| 53 | .Nm strpbrk , | ||
| 54 | .Nm strsep, | ||
| 55 | .Nm strspn , | ||
| 56 | .Nm strcspn , | ||
| 57 | .Nm strstr , | ||
| 58 | .Nm strtok , | ||
| 59 | .Nm index , | ||
| 60 | .Nm rindex | ||
| 61 | .Nd string specific functions | 37 | .Nd string specific functions |
| 62 | .Sh SYNOPSIS | 38 | .Sh SYNOPSIS |
| 63 | .Fd #include <string.h> | 39 | .Fd #include <string.h> |
| 64 | .Ft char * | 40 | .Ft char * |
| 65 | .Fn strcat "char *s" "const char * append" | 41 | .Fn strcat "char *s" "const char *append" |
| 42 | .Ft char * | ||
| 43 | .Fn strlcat "char *s" "const char *append" "size_t size" | ||
| 66 | .Ft char * | 44 | .Ft char * |
| 67 | .Fn strncat "char *s" "const char *append" "size_t count" | 45 | .Fn strncat "char *s" "const char *append" "size_t count" |
| 68 | .Ft char * | 46 | .Ft char * |
| @@ -80,6 +58,8 @@ | |||
| 80 | .Ft char * | 58 | .Ft char * |
| 81 | .Fn strcpy "char *dst" "const char *src" | 59 | .Fn strcpy "char *dst" "const char *src" |
| 82 | .Ft char * | 60 | .Ft char * |
| 61 | .Fn strlcpy "char *dst" "const char *src" "size_t size" | ||
| 62 | .Ft char * | ||
| 83 | .Fn strncpy "char *dst" "const char *src" "size_t count" | 63 | .Fn strncpy "char *dst" "const char *src" "size_t count" |
| 84 | .Ft char * | 64 | .Ft char * |
| 85 | .Fn strerror "int errno" | 65 | .Fn strerror "int errno" |
| @@ -103,35 +83,37 @@ | |||
| 103 | .Fn rindex "const char *s" "int c" | 83 | .Fn rindex "const char *s" "int c" |
| 104 | .Sh DESCRIPTION | 84 | .Sh DESCRIPTION |
| 105 | The string functions | 85 | The string functions |
| 106 | functions manipulate strings terminated by a | 86 | manipulate strings terminated by a |
| 107 | null byte. | 87 | NUL byte. |
| 108 | .Pp | 88 | .Pp |
| 109 | See the specific manual pages for more information. | 89 | See the specific manual pages for more information. |
| 110 | For manipulating variable length generic objects as byte | 90 | For manipulating variable length generic objects as byte |
| 111 | strings (without the null byte check), see | 91 | strings (without the NUL-byte check), see |
| 112 | .Xr bstring 3 . | 92 | .Xr bstring 3 . |
| 113 | .Pp | 93 | .Pp |
| 114 | Except as noted in their specific manual pages, | 94 | Except as noted in their specific manual pages, |
| 115 | the string functions do not test the destination | 95 | the string functions do not test the destination |
| 116 | for size limitations. | 96 | for size limitations. |
| 117 | .Sh SEE ALSO | 97 | .Sh SEE ALSO |
| 98 | .Xr bstring 3 , | ||
| 118 | .Xr index 3 , | 99 | .Xr index 3 , |
| 100 | .Xr rindex 3 , | ||
| 101 | .Xr strcasecmp 3 , | ||
| 119 | .Xr strcat 3 , | 102 | .Xr strcat 3 , |
| 120 | .Xr strchr 3 , | 103 | .Xr strchr 3 , |
| 121 | .Xr strrchr 3 , | ||
| 122 | .Xr strcmp 3 , | 104 | .Xr strcmp 3 , |
| 123 | .Xr strcasecmp 3 , | ||
| 124 | .Xr strcpy 3 , | 105 | .Xr strcpy 3 , |
| 106 | .Xr strcspn 3 , | ||
| 125 | .Xr strerror 3 , | 107 | .Xr strerror 3 , |
| 108 | .Xr strlcat 3 , | ||
| 109 | .Xr strlcpy 3 , | ||
| 126 | .Xr strlen 3 , | 110 | .Xr strlen 3 , |
| 127 | .Xr strpbrk 3 , | 111 | .Xr strpbrk 3 , |
| 112 | .Xr strrchr 3 , | ||
| 128 | .Xr strsep 3 , | 113 | .Xr strsep 3 , |
| 129 | .Xr strspn 3 , | 114 | .Xr strspn 3 , |
| 130 | .Xr strcspn 3 , | ||
| 131 | .Xr strstr 3 , | 115 | .Xr strstr 3 , |
| 132 | .Xr strtok 3 , | 116 | .Xr strtok 3 |
| 133 | .Xr rindex 3 | ||
| 134 | .Xr bstring 3 | ||
| 135 | .Sh STANDARDS | 117 | .Sh STANDARDS |
| 136 | The | 118 | The |
| 137 | .Fn strcat , | 119 | .Fn strcat , |
| @@ -145,12 +127,10 @@ The | |||
| 145 | .Fn strerror , | 127 | .Fn strerror , |
| 146 | .Fn strlen , | 128 | .Fn strlen , |
| 147 | .Fn strpbrk , | 129 | .Fn strpbrk , |
| 148 | .Fn strsep , | ||
| 149 | .Fn strspn , | 130 | .Fn strspn , |
| 150 | .Fn strcspn , | 131 | .Fn strcspn , |
| 151 | .Fn strstr , | 132 | .Fn strstr , |
| 152 | and | 133 | and |
| 153 | .Fn strtok | 134 | .Fn strtok |
| 154 | functions | 135 | functions conform to |
| 155 | conform to | ||
| 156 | .St -ansiC . | 136 | .St -ansiC . |
