null == "" is true?

Steven Schveighoffer schveiguy at gmail.com
Tue Jul 12 17:13:08 UTC 2022


On 7/12/22 12:40 PM, H. S. Teoh wrote:
> Because an empty string is, by default, represented by an empty slice of
> the null pointer.

No, it's not a null pointer. It's a pointer to a zero-character. But it 
is indeed an empty slice.

-Steve


More information about the Digitalmars-d-learn mailing list