https://issues.dlang.org/show_bug.cgi?id=17623
Vladimir Panteleev <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |spec Component|dmd |dlang.org Hardware|x86_64 |All OS|Linux |All --- Comment #1 from Vladimir Panteleev <[email protected]> --- This is a documentation bug; the code is correct. A dynamic array in D is represented as a pointer (.ptr) and a length (.length). > string s = null; s.length is 0 and s.ptr is null. > string t = ""; t.length is also 0, but t.ptr points towards a zero-length string literal. The distinction is mainly that D string literals are zero-terminated, so that they can be implicitly converted to a C string (const char*). --
