On 9/25/14 2:41 AM, SlomoTheBrave wrote:
On Thursday, 25 September 2014 at 05:29:37 UTC, AsmMan wrote:
Does D has C#'s string.Empty?

string.init ?

----
     string a;
     a = string.init;
     assert( a == "");
----

does the job for the type string at least.

null also works. In fact, in the above, a is already string.init or null before assigning (D always initializes variables unless asked not to).

a = null; // same as a = string.init;

-Steve

Reply via email to