I just don’t understand and can’t find much info about wchar end.
If it ends with single null byte, how it know it not string end yet, if something like that “009A” represent one of unicode symbols?
If it ends with two null bytes? Well, I am not sure about it, need confirmation.
Since a wide string is an array of wide characters, it couldn’t even end in an one-byte NUL. It is a two-byte NUL. (Arrays in C/C++ can only hold members of the same type, so of the same size).
Also, for ASCII standard characters, there always is one or three one-byte 0, as only extended characters start by a non-zero first byte (depending on whether
wchar_tis 16 or 32 bit wide – for simplicity, I assume 16-bit and little-endian):