diff options
Diffstat (limited to 'src/lib/libc/string/strcmp.3')
-rw-r--r-- | src/lib/libc/string/strcmp.3 | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/src/lib/libc/string/strcmp.3 b/src/lib/libc/string/strcmp.3 index fecaa85410..73cd5b40d8 100644 --- a/src/lib/libc/string/strcmp.3 +++ b/src/lib/libc/string/strcmp.3 | |||
@@ -13,11 +13,7 @@ | |||
13 | .\" 2. Redistributions in binary form must reproduce the above copyright | 13 | .\" 2. Redistributions in binary form must reproduce the above copyright |
14 | .\" notice, this list of conditions and the following disclaimer in the | 14 | .\" notice, this list of conditions and the following disclaimer in the |
15 | .\" documentation and/or other materials provided with the distribution. | 15 | .\" documentation and/or other materials provided with the distribution. |
16 | .\" 3. All advertising materials mentioning features or use of this software | 16 | .\" 3. Neither the name of the University nor the names of its contributors |
17 | .\" must display the following acknowledgement: | ||
18 | .\" This product includes software developed by the University of | ||
19 | .\" California, Berkeley and its contributors. | ||
20 | .\" 4. Neither the name of the University nor the names of its contributors | ||
21 | .\" may be used to endorse or promote products derived from this software | 17 | .\" may be used to endorse or promote products derived from this software |
22 | .\" without specific prior written permission. | 18 | .\" without specific prior written permission. |
23 | .\" | 19 | .\" |
@@ -33,14 +29,14 @@ | |||
33 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
34 | .\" SUCH DAMAGE. | 30 | .\" SUCH DAMAGE. |
35 | .\" | 31 | .\" |
36 | .\" from: @(#)strcmp.3 5.6 (Berkeley) 6/29/91 | 32 | .\" $OpenBSD: strcmp.3,v 1.9 2007/05/31 19:19:32 jmc Exp $ |
37 | .\" $Id: strcmp.3,v 1.1.1.1 1995/10/18 08:42:22 deraadt Exp $ | ||
38 | .\" | 33 | .\" |
39 | .Dd June 29, 1991 | 34 | .Dd $Mdocdate: May 31 2007 $ |
40 | .Dt STRCMP 3 | 35 | .Dt STRCMP 3 |
41 | .Os | 36 | .Os |
42 | .Sh NAME | 37 | .Sh NAME |
43 | .Nm strcmp | 38 | .Nm strcmp , |
39 | .Nm strncmp | ||
44 | .Nd compare strings | 40 | .Nd compare strings |
45 | .Sh SYNOPSIS | 41 | .Sh SYNOPSIS |
46 | .Fd #include <string.h> | 42 | .Fd #include <string.h> |
@@ -53,8 +49,7 @@ The | |||
53 | .Fn strcmp | 49 | .Fn strcmp |
54 | and | 50 | and |
55 | .Fn strncmp | 51 | .Fn strncmp |
56 | functions | 52 | functions lexicographically compare the NUL-terminated strings |
57 | lexicographically compare the null-terminated strings | ||
58 | .Fa s1 | 53 | .Fa s1 |
59 | and | 54 | and |
60 | .Fa s2 . | 55 | .Fa s2 . |
@@ -64,7 +59,7 @@ The | |||
64 | and | 59 | and |
65 | .Fn strncmp | 60 | .Fn strncmp |
66 | return an integer greater than, equal to, or less than 0, according | 61 | return an integer greater than, equal to, or less than 0, according |
67 | as the string | 62 | to whether the string |
68 | .Fa s1 | 63 | .Fa s1 |
69 | is greater than, equal to, or less than the string | 64 | is greater than, equal to, or less than the string |
70 | .Fa s2 . | 65 | .Fa s2 . |
@@ -73,9 +68,8 @@ The comparison is done using unsigned characters, so that | |||
73 | is greater than | 68 | is greater than |
74 | .Ql \e0 . | 69 | .Ql \e0 . |
75 | .Pp | 70 | .Pp |
76 | The | ||
77 | .Fn strncmp | 71 | .Fn strncmp |
78 | compares not more than | 72 | compares at most |
79 | .Fa len | 73 | .Fa len |
80 | characters. | 74 | characters. |
81 | .Sh SEE ALSO | 75 | .Sh SEE ALSO |
@@ -89,6 +83,5 @@ The | |||
89 | .Fn strcmp | 83 | .Fn strcmp |
90 | and | 84 | and |
91 | .Fn strncmp | 85 | .Fn strncmp |
92 | functions | 86 | functions conform to |
93 | conform to | ||
94 | .St -ansiC . | 87 | .St -ansiC . |