From 50430063cd01bcdd44d1182025865abf15bf2de7 Mon Sep 17 00:00:00 2001 From: mike Date: Thu, 11 Oct 2001 17:02:44 +0000 Subject: Note that strncmp() will not compare characters after a NUL character. Add a missing word. Bump document date. Inspired by: IEEE Std 1003.1-200x (Draft 7) MFC after: 3 days --- lib/libc/string/strcmp.3 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lib/libc/string') diff --git a/lib/libc/string/strcmp.3 b/lib/libc/string/strcmp.3 index 33db3c6..08adad0 100644 --- a/lib/libc/string/strcmp.3 +++ b/lib/libc/string/strcmp.3 @@ -36,7 +36,7 @@ .\" @(#)strcmp.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd June 4, 1993 +.Dd October 11, 2001 .Dt STRCMP 3 .Os .Sh NAME @@ -64,9 +64,16 @@ and .Pp The .Fn strncmp +function compares not more than .Fa len characters. +Because +.Fn strncmp +is designed for comparing strings rather than binary data, +characters that appear after a +.Ql \e0 +character are not compared. .Sh RETURN VALUES The .Fn strcmp -- cgit v1.1