Compile-time string literal with encoding detection and UTF-8 decode. More...
#include <string.h>
Public Member Functions | |
| consteval | CompiledString (const char(&str)[N]) |
| constexpr bool | isAscii () const |
| constexpr size_t | charCount () const |
| constexpr size_t | byteCount () const |
| constexpr const char * | bytes () const |
| constexpr const char32_t * | codepoints () const |
| constexpr uint64_t | hash () const |
| Compile-time FNV-1a hash of the native storage. | |
Compile-time string literal with encoding detection and UTF-8 decode.
The consteval constructor copies the literal bytes and, if any byte is above 0x7F, decodes the entire string as UTF-8 into a char32_t array. All work happens at compile time — no runtime encoding scan or UTF-8 parsing. Used by the PROMEKI_STRING macro.
| N | Size of the string literal including the null terminator. |