public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] man/man3/strcmp.3: replace equal/less/greater words
@ 2026-03-10 13:52 Ben Song
  2026-03-16  0:25 ` Alejandro Colomar
  0 siblings, 1 reply; 3+ messages in thread
From: Ben Song @ 2026-03-10 13:52 UTC (permalink / raw)
  To: alx; +Cc: linux-man, Ben Song

There is no meaning for one string is `less than` or `greater than`
another string, but the value of a character in two strings can be
compared.

Signed-off-by: Ben Song <bensongsyz@gmail.com>
---
 man/man3/strcmp.3 | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/man/man3/strcmp.3 b/man/man3/strcmp.3
index 2784d51c8..bc238aec1 100644
--- a/man/man3/strcmp.3
+++ b/man/man3/strcmp.3
@@ -23,11 +23,11 @@ .SH DESCRIPTION
 .BR strcmp ()
 The
 .BR strcmp ()
-function compares the two strings
+function compares the characters in two strings
 .I s1
 and
-.IR s2 .
-The locale is not taken into account (for a locale-aware comparison, see
+.I s2
+one by one until characters differ or until the end of one of the two strings is reached. The locale is not taken into account (for a locale-aware comparison, see
 .BR strcoll (3)).
 The comparison is done using unsigned characters.
 .IP
@@ -39,16 +39,16 @@ .SH DESCRIPTION
 .I s1
 and
 .I s2
-are equal;
+are identical;
 .IP \[bu]
-a negative value if
+a negative value if the value of first different character in
 .I s1
-is less than
+is less than that in
 .IR s2 ;
 .IP \[bu]
-a positive value if
+a positive value if the value of first different character in
 .I s1
-is greater than
+is greater than that in
 .IR s2 .
 .RE
 .IP
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-03-19  3:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-10 13:52 [PATCH] man/man3/strcmp.3: replace equal/less/greater words Ben Song
2026-03-16  0:25 ` Alejandro Colomar
2026-03-19  3:09   ` Ben Song

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox