What is empty string in D programing language?
String is array of characters ( http://dlang.org/arrays.html#strings )
Probably: alias immutable(char)[] string
Based on that empty string should be an empty array. But then, what kind of thing the empty array is?
Any ideas?
any (non-static) array is essentially a struct with a pointer to the start of the memory block the array is contained in and a length
an empty array just has length==0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With