> does this view still contain the original message or the corrupted message
The string view would refer to the characters in the string;
"a typical implementation holds only two members: a pointer to constant CharT and a size"
https://en.cppreference.com/w/cpp/string/basic_string_view
The view would therefore refer to the characters in the corrupted string, but the size would be that of the original string. It is a bad situation to get into.
> the fourth argument seems to be an std::chars_format which doesn't seem to be of integral type.
The fourth
std::chars_format parameter is used only by the overloads for floating point types, it specifies the floating-point format that should be used.
We are using integer values, the overload is overload (1), the fourth parameter is the integer base to be used. We pass 16 because we want a hexadecimal representation.
> a good c++ 20 compiler
On windows, go for the microsoft compiler (Visual Studio Community Edition).
On Unix-like systems, either the GNU compiler (gcc/g++) or the LLVM compiler (clang/clang++).
> good books for both c++ 17 and 20
Two books covering C++17:
Overview: Stroustrup's 'A Tour of C++ (2nd Edition)'
https://www.amazon.com/Tour-2nd-Depth-Bjarne-Stroustrup/dp/0134997832
More detailed: Josuttis's 'C++17 - The Complete Guide: First Edition'
https://www.amazon.com/C-17-Complete-Guide-First/dp/396730017X