On Tuesday, 28 January 2020 at 07:36:25 UTC, Malte wrote:
I want to format an array using the %(...%) syntax. How can I
change the separator? I tried to use ? and add it as additional
parameter, but that doesn't seem to work on arrays:
import std;
void main()
{
writeln("This works:");
On Tuesday, 28 January 2020 at 08:54:16 UTC, Simen Kjærås wrote:
import std.stdio : writefln;
import std.format : format;
import std.algorithm : map;
auto vec = [1000, 2000, 3000];
writefln("%-(%s\t%)", vec.map!(e => format!"%,2?d"('_',
e)));
That helps, thank you very
On Monday, 27 January 2020 at 22:05:57 UTC, Ali Çehreli wrote:
On 1/27/20 1:15 PM, Herbert wrote:
On Monday, 27 January 2020 at 20:15:33 UTC, Steven
Schveighoffer wrote:
On 1/27/20 3:06 PM, Herbert wrote:
[...]
D doesn't have a "Range" type like this. But you can use
ranges of different typ
On 1/28/20 1:55 AM, Herbert wrote:
> wow, pragma,
pragma was to indicate the type of elements at compile time.
> import ...
Yes, iota is a Phobos feature, part of a module.
> only to declare a subrange type, something so simple and natural
Some languages think so.
> I could use it in many f
Today marks the 100th post on the GtkDcoding blog where we
continue with Button interactions. You can find it here:
https://gtkdcoding.com/2020/01/28/0100-sfx-button-interactions-ii-color-font-shape.html
After today, I'll be on hiatus from the blog and posts may be
sporadic.
On 1/28/20 1:25 AM, Jesse Phillips wrote:
I really feel like this is all very well thought out and clean, I don't
appear to have a previous model to help visualize this output approach.
Right now something like tee is coming to mind. Thank you for explaining
with the answer.
Thanks! Tee is a
Hello! I have a question about `alias` template parameter and
getOverloads.
For instance I have some code like this:
// -
import std;
import core.thread;
void foo(string param1) {}
void foo(string param1, int param2) {}
template Bar(alias Func)
{
// Next line is not valid now. This is m
On Tuesday, 28 January 2020 at 19:26:03 UTC, uranuz wrote:
Hello! I have a question about `alias` template parameter and
getOverloads.
For instance I have some code like this:
// -
import std;
import core.thread;
void foo(string param1) {}
void foo(string param1, int param2) {}
template Ba
Thanks for advice ;) This looks like some `standard trick` that
is yet not learnt or forgoten by me personally. The key was in
using `parent` trait. This is what I failed to think of. This is
working as expected:
//-
import std;
import core.thread;
import std.meta: AliasSeq;
void foo(strin
On Tuesday, 28 January 2020 at 19:59:15 UTC, uranuz wrote:
So as far as I understand alias template parameter gives access
to all of items of overload set as I was expecting. The only
problem is that I didn't found something about it in
specification about templates:
https://dlang.org/spec/tem
your linked list seems very complex
I have read it two or three times just before writing my question:
https://dlang.org/spec/declaration.html#alias
And also a have read all the dlang docs several time few years
ago... ;)
But I don't see what do you you mean by writing that it was
menioned here. I don't se any words or any example
How to convert "string" to const(wchar)* ?
The code bellow is making confuse strange characters.
cast(wchar*) str
On Wednesday, 29 January 2020 at 05:17:03 UTC, Marcone wrote:
How to convert "string" to const(wchar)* ?
The code bellow is making confuse strange characters.
cast(wchar*) str
this seems working:
string s = "test ğüişçöıı";
wstring wstr = s.to!wstring;
const(wchar)* str = wstr.ptr;
writeln(s
On Tuesday, January 28, 2020 10:17:03 PM MST Marcone via Digitalmars-d-learn
wrote:
> How to convert "string" to const(wchar)* ?
> The code bellow is making confuse strange characters.
>
> cast(wchar*) str
Of course it is. string is immutable(char)[], and the characters are in
UTF-8. immutable(wc
On Wednesday, 29 January 2020 at 06:53:15 UTC, Jonathan M Davis
wrote:
On Tuesday, January 28, 2020 10:17:03 PM MST Marcone via
Digitalmars-d-learn wrote:
[...]
Of course it is. string is immutable(char)[], and the
characters are in UTF-8. immutable(wchar)[] would would be
UTF-16. Even casti
16 matches
Mail list logo