On Thursday, 7 April 2022 at 12:51:26 UTC, Stanislav Blinov wrote:
On Thursday, 7 April 2022 at 10:50:35 UTC, BoQsc wrote:
wchar_t* clang_string = cast(wchar_t *)"AA";
You're witnessing undefined behavior. "AA" is a string
literal and is stored in the data seg
On Thursday, 7 April 2022 at 10:50:35 UTC, BoQsc wrote:
wchar_t* clang_string = cast(wchar_t *)"AA";
You're witnessing undefined behavior. "AA" is a string
literal and is stored in the data segment. Mere cast to wchar_t*
does not make writing through that poin
On Thursday, 7 April 2022 at 11:03:39 UTC, Tejas wrote:
On Thursday, 7 April 2022 at 10:50:35 UTC, BoQsc wrote:
Here I try to concatenate three character strings using
`wcsncat()`.
[...]
Maybe try using `wstring` instead of string? Also use the `w`
postfix
```d
wstring dlang_string = "BBB
On Thursday, 7 April 2022 at 10:50:35 UTC, BoQsc wrote:
Here I try to concatenate three character strings using
`wcsncat()`.
[...]
Maybe try using `wstring` instead of string? Also use the `w`
postfix
```d
wstring dlang_string = "BBB"w;
I can't test because I'm not on my PC and I
Here I try to concatenate three character strings using
`wcsncat()`.
`clang_string` AA
`dlang_string` BBB
`winpointer_to_string` CC
```
import std.stdio;
@system void main(){
import std.utf: toUTF16z, toUTF16;
import cor