Thread overview | ||||||
---|---|---|---|---|---|---|
|
February 06, 2020 How to converte string to wstring[]? | ||||
---|---|---|---|---|
| ||||
How to converte "string" to wstring[] in Dlang? |
February 06, 2020 Re: How to converte string to wstring[]? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Marcone | On Thursday, 6 February 2020 at 21:53:08 UTC, Marcone wrote:
> How to converte "string" to wstring[] in Dlang?
You don't, generally. A string can be converted to a wstring, but a wstring[] is a very different thing.
import std.conv;
wstring s = to!wstring(some_string);
note that works for most types.
just string to wstring[] depends on the context.
|
February 07, 2020 Re: How to converte string to wstring[]? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Adam D. Ruppe | import std.conv: to; string str = "test1"; wstring[] wstr = [to!wstring(str)]; |
February 08, 2020 Re: How to converte string to wstring[]? | ||||
---|---|---|---|---|
| ||||
Posted in reply to novice2 | On Friday, 7 February 2020 at 06:20:09 UTC, novice2 wrote:
> import std.conv: to;
>
> string str = "test1";
> wstring[] wstr = [to!wstring(str)];
Thank you!
|
Copyright © 1999-2021 by the D Language Foundation