Re: Implicit String-Literal Concatenation

Liste des GroupesRevenir à cl c  
Sujet : Re: Implicit String-Literal Concatenation
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.lang.c
Date : 07. Mar 2024, 23:08:48
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <usdad0$18du3$3@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
User-Agent : Pan/0.155 (Kherson; fc5a80b8)
On Mon, 04 Mar 2024 20:55:28 -0800, Keith Thompson wrote:

Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>
On Thu, 29 Feb 2024 14:14:52 -0800, Keith Thompson wrote:
>
"A *string* is a contiguous sequence of characters terminated by and
including the first null character."
>
So how come strlen(3) does not include the null?
 Because the *length of a string* is by definition "the number of bytes
preceding the null character".
So the “string” itself includes the null character, but its “length” does not?

Date Sujet#  Auteur
7 Mar 24 * Re: Implicit String-Literal Concatenation8Lawrence D'Oliveiro
7 Mar 24 +* Re: Implicit String-Literal Concatenation6Kaz Kylheku
8 Mar 24 i`* Re: Implicit String-Literal Concatenation5Keith Thompson
8 Mar 24 i +* Re: Implicit String-Literal Concatenation2Kaz Kylheku
8 Mar 24 i i`- Re: Implicit String-Literal Concatenation1Keith Thompson
8 Mar 24 i +- Re: Implicit String-Literal Concatenation1Chris M. Thomasson
8 Mar 24 i `- Re: Implicit String-Literal Concatenation1Richard Harnden
8 Mar 24 `- Re: Implicit String-Literal Concatenation1Keith Thompson

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal