Re: Suggestion for edit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Walter


Actually that new phrasing on the last sentence is much clearer. I was scratching my head over what it meant for a string to be less than (or greater than) another string. 

Cheers
Andrew




From: Walter Harms <wharms@xxxxxx>

Sent: Tuesday, 7 April 2020 7:17 PM

To: Andrew Micallef <andrew.micallef@xxxxxxxxxxx>; linux-man@xxxxxxxxxxxxxxx <linux-man@xxxxxxxxxxxxxxx>

Subject: AW: Suggestion for edit

 


hi Andrew, i have to admit that i dropped over the last sentence. And it should be *very* clear what the return means,

ehre my idea:



If both strings are equal the function returns 0.

Otherwises it returns the differences between the last compared characters.



The last feature is important for sorting. I never found a good wording for that.



re,

 wh







________________________________________

Von: linux-man-owner@xxxxxxxxxxxxxxx <linux-man-owner@xxxxxxxxxxxxxxx> im Auftrag von Andrew Micallef <andrew.micallef@xxxxxxxxxxx>

Gesendet: Dienstag, 7. April 2020 09:07:50

An: linux-man@xxxxxxxxxxxxxxx

Betreff: Fw: Suggestion for edit



Hi,





I'd like to suggest an edit to the description of `strcmp` in the standard C library man page.

I found this description to be kind of confusing, and think the language could be a bit more

straight forward.







 At present the description reads as follows:



The strcmp() function compares the two strings s1 and s2.  The locale

       is not taken into account (for a locale-aware comparison, see

       strcoll(3)).  It returns an integer less than, equal to, or greater

       than zero if s1 is found, respectively, to be less than, to match, or

       be greater than s2.



I am suggesting the following edits:



The strcmp() function compares the two strings s1 and s2.  The locale

       is not taken into account (for a locale-aware comparison, see

       strcoll(3)).  It returns an integer, which is 0 if the strings

       match. Otherwise, a negative integer indicates s1 is less than s2,

       while a positive integer indicates s1 is greater than s2.





Regards

Andrew






[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux