CsString  1.3.2
Using C++20

A new data type for char8_t was added in the release of the C++20 standard. Several new methods which accept a char8_t have been added to the CsString library.

There are two ways to use a method which accepts a parameter of this type. You can compile CsString and your application with C++20. The other option is to compile CsString with C++17 and your application with C++20.

String Literal Prefix

The usage of the string literal prefix u8 was a known breaking change in C++20. Before this release using no prefix or the u8 prefix returned a string as an "array of char".

With the release of C++20 using the u8 prefix changed. This prefix indicates the string is an array of char8_t. The following example shows how to construct a CsString which is initialized by using an array of char8_t.

// example 1
CsString::CsString_utf8 strA = u8"To dream the impossible dream";
// example 2
CsString::CsBasicString<CsString::utf8> strB = u8"On a clear day you can see forever";