It is undefined behavior to apply an offset to a null pointer. I would
have liked to reference cppreference but best I found was the PR that
added this check to clang's undefined behavior sanitizer:
https://reviews.llvm.org/D67122 .
Code submissions have continually suffered from formatting
inconsistencies that constantly have to be addressed. Using
clang-format simplifies this by making code formatting more consistent,
and allows automation of the code formatting so that maintainers can
focus more on the code itself instead of code formatting.
If on windows, use the windows UTF conversion functions due to the fact
that the existing utf code is meant for 32bit wide characters, while the
windows conversion functions will properly handle 16bit wide characters.