String view

NN nn-mail at bk.ru
Sun Jan 21 12:27:51 PST 2007


Why there is no string view in D ?

Assume I have pointer in memory pointing to zero ending string:
char* p;

I want to create a string from it but i do not want to copy it.
Assume I have a special class for this:
StringView s(p);

But what would I do if function receives char[] ? There will be a copy.
What if I do not want a copy ?

Thanx.



More information about the Digitalmars-d mailing list