On Friday, 13 October 2023 at 10:11:33 UTC, Nick Treleaven wrote:
>You can also do it using a string mixin:
mixin(create_fn!(mixin("`", i, "`")));
I think that's equivalent to i.stringof
anyway.
Thank you for the info!
October 14, 2023 Re: How to use ".stringof" to get the value of a variable and not the name of the variable (identifier) itself? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Nick Treleaven | On Friday, 13 October 2023 at 10:11:33 UTC, Nick Treleaven wrote: >You can also do it using a string mixin:
I think that's equivalent to Thank you for the info! |
October 15, 2023 Re: How to use ".stringof" to get the value of a variable and not the name of the variable (identifier) itself? | ||||
---|---|---|---|---|
| ||||
Posted in reply to rempas | On Saturday, 14 October 2023 at 06:48:40 UTC, rempas wrote: >On Friday, 13 October 2023 at 10:11:33 UTC, Nick Treleaven wrote: >You can also do it using a string mixin:
I think that's equivalent to Thank you for the info! You already got a lot of good answers, I thought I'd just share this for anyone searching for nogc string formatting compatible with betterC: |
October 17, 2023 Re: How to use ".stringof" to get the value of a variable and not the name of the variable (identifier) itself? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Imperatorn | On Sunday, 15 October 2023 at 07:22:53 UTC, Imperatorn wrote: >You already got a lot of good answers, I thought I'd just share this for anyone searching for nogc string formatting compatible with betterC: You thought, well, thank you very much and have a great day! |
October 17, 2023 Re: How to use ".stringof" to get the value of a variable and not the name of the variable (identifier) itself? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Imperatorn | On Sunday, 15 October 2023 at 07:22:53 UTC, Imperatorn wrote: >You already got a lot of good answers, I thought I'd just share this for anyone searching for nogc string formatting compatible with betterC: Doesn't it make more sense to use ParseResult!T parse(T)(cstring str) instead of nested if's here: Thanks, SDB@79 |
October 17, 2023 Re: How to use ".stringof" to get the value of a variable and not the name of the variable (identifier) itself? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Salih Dincer | On Tuesday, 17 October 2023 at 13:31:39 UTC, Salih Dincer wrote: >On Sunday, 15 October 2023 at 07:22:53 UTC, Imperatorn wrote: >You already got a lot of good answers, I thought I'd just share this for anyone searching for nogc string formatting compatible with betterC: Doesn't it make more sense to use ParseResult!T parse(T)(cstring str) instead of nested if's here: Thanks, SDB@79 Omg, yeah, that looks like some kind of hack. Make a PR :) |