On Monday, 23 September 2019 at 20:38:03 UTC, Brett wrote:
cast(wstring)entry.szExeFile == Name
to!wstring(entry.szExeFile) == Name

These all fail. The strings are clearly the same. I can compare char by char and it works. latest D 2.088. The only thing is that szExeFile is a static wchar array... which shouldn't effect the comparison.

If you're comparing a static array, you're also comparing the bytes after the NUL character. Both of those conversions will give you a wstring with the length of the entire array, regardless of and including any NUL characters, so that's probably not what you want. fromStringz would probably be more appropriate there.

Reply via email to