Re: How to covert dchar and wchar to string?

2021-01-26 Thread Steven Schveighoffer via Digitalmars-d-learn
On 1/25/21 1:45 PM, Rempas wrote: Actually what the title says. For example I have dchar c = '\u03B3'; and I want to make it into string. I don't want to use "to!string(c);". Any help? That's EXACTLY what you want to use, if what you want is a string. If you just want a conversion to a char

Re: How to covert dchar and wchar to string?

2021-01-25 Thread Q. Schroll via Digitalmars-d-learn
On Monday, 25 January 2021 at 18:45:11 UTC, Rempas wrote: Actually what the title says. For example I have dchar c = '\u03B3'; and I want to make it into string. I don't want to use "to!string(c);". Any help? char[] dcharToChars(char[] buffer, dchar value) { import std.range : put;

Re: How to covert dchar and wchar to string?

2021-01-25 Thread Ferhat Kurtulmuş via Digitalmars-d-learn
On Monday, 25 January 2021 at 18:45:11 UTC, Rempas wrote: Actually what the title says. For example I have dchar c = '\u03B3'; and I want to make it into string. I don't want to use "to!string(c);". Any help? if you are trying to avoid GC allocations this is not what you want. dchar c

How to covert dchar and wchar to string?

2021-01-25 Thread Rempas via Digitalmars-d-learn
Actually what the title says. For example I have dchar c = '\u03B3'; and I want to make it into string. I don't want to use "to!string(c);". Any help?