Is this a new bug ?

2022-09-23 Thread test123 via Digitalmars-d-learn
If so please report it for me to bugs platform. I can not register one. ```d package { version(TEST) { static: } else { __gshared: } uint test = 0; } ``` ldmd2 -betterC -vtls -c ./test.d ./test.d(7): `test` is thread local

Re: to delete the '\0' characters

2022-09-23 Thread Salih Dincer via Digitalmars-d-learn
On Friday, 23 September 2022 at 22:17:51 UTC, Paul Backus wrote: Apologies for the confusion. You can use [stripRight](https://phobos.dpldocs.info/std.string.stripRight.2.html) We have a saying: Estaghfirullah! Thank you all so much because it has been very useful for me. I learned two things

Re: to delete the '\0' characters

2022-09-23 Thread Paul Backus via Digitalmars-d-learn
On Friday, 23 September 2022 at 18:37:59 UTC, Salih Dincer wrote: On Thursday, 22 September 2022 at 10:53:32 UTC, Salih Dincer wrote: Is there a more accurate way to delete **the '\0' characters at the end of the string?** * character**S** * at the **END** * of the **STRING** Apologies for t

Re: to delete the '\0' characters

2022-09-23 Thread Ali Çehreli via Digitalmars-d-learn
On 9/23/22 11:37, Salih Dincer wrote: > * character**S** > * at the **END** > * of the **STRING** I think the misunderstanding is due to the following data you've posted earlier (I am abbreviating): 53 F6 6E 6D 65 64 65 6E 20 79 75 72 64 75 6D 75 6E 20 FC 73 74 FC 6E 64 65 20 74 FC 74 65 6E

Re: How to workaround on this (bug?)

2022-09-23 Thread Kagamin via Digitalmars-d-learn
Provide two functions and let the caller choose ``` void fun(ref Variant v) nothrow { } void fun2(Variant v) { fun(v); } ```

Re: to delete the '\0' characters

2022-09-23 Thread Salih Dincer via Digitalmars-d-learn
On Friday, 23 September 2022 at 14:38:35 UTC, Jesse Phillips wrote: You should be explicit with requirements. Sorry, generally what I speak is Turkish language. So, I speak English as a foreign language but it's clear I wrote. What do you think when you look at the text I've pointed to follo

Re: to delete the '\0' characters

2022-09-23 Thread Jesse Phillips via Digitalmars-d-learn
On Friday, 23 September 2022 at 08:50:42 UTC, Salih Dincer wrote: On Thursday, 22 September 2022 at 21:49:36 UTC, Ali Çehreli wrote: On 9/22/22 14:31, Salih Dincer wrote: If you have multiple '\0' chars that you will continue looking for, how about the following? It can be preferred in terms

Re: Poste some interesting vibe.d webpages

2022-09-23 Thread Alain De Vos via Digitalmars-d-learn
Note. How to do authentications & sessions ,is important, but badly described.

Re: How to workaround on this (bug?)

2022-09-23 Thread Quirin Schroll via Digitalmars-d-learn
On Friday, 16 September 2022 at 22:43:43 UTC, frame wrote: ```d import std.variant; // error: destructor `std.variant.VariantN!32LU.VariantN.~this` is not `nothrow` void fun(Variant v) nothrow { } void main() { fun(Variant()); } ``` A reference, pointer or slice works. I could do somethi

Re: to delete the '\0' characters

2022-09-23 Thread Salih Dincer via Digitalmars-d-learn
On Thursday, 22 September 2022 at 21:49:36 UTC, Ali Çehreli wrote: On 9/22/22 14:31, Salih Dincer wrote: If you have multiple '\0' chars that you will continue looking for, how about the following? It can be preferred in terms of working at ranges. But it isn't useful in terms of having mor

Re: to delete the '\0' characters

2022-09-23 Thread Quirin Schroll via Digitalmars-d-learn
On Thursday, 22 September 2022 at 10:53:32 UTC, Salih Dincer wrote: Is there a more accurate way to delete the '\0' characters at the end of the string? Accurate? No. Your code works. Correct is correct, no matter efficiency or style. I tried functions in this module: https://dlang.org/phob