char[][] to std::vector<std::string> - DIP or dmd-issue?
Dennis Ritchie via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Jun 13 08:58:42 PDT 2015
On Saturday, 13 June 2015 at 15:45:34 UTC, anonymous wrote:
> Before jumping to a solution, please elaborate on the perceived
> problem. I have a feeling that there is none.
Do you like to write?
char[][] strArray = ["foo".dup, "bar".dup, "baz".dup];
I suggest that such an option:
str[] strArray = ["foo", "bar", "baz"];
On Saturday, 13 June 2015 at 15:38:31 UTC, Dennis Ritchie wrote:
> Ie str, wstr, dstr be mutable counterparts immutable strings
> respectively str (mutable(char[])), wstr (mutable(wchar[])),
> dstr (mutable(dchar[])). In C++:
> std::vector<std::string>
std::string in C++.
> str[], wstr[], dstr[] in C++:
> std::vector<std::vector<std::string> >
std::vector<string> in C++.
More information about the Digitalmars-d-learn
mailing list