libpromeki main
PROfessional MEdia toolKIt
 
Loading...
Searching...
No Matches
CompiledString< N > Class Template Reference

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 charbytes () const
 
constexpr const char32_tcodepoints () const
 
constexpr uint64_t hash () const
 Compile-time FNV-1a hash of the native storage.
 

Detailed Description

template<size_t N>
class CompiledString< N >

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.

Template Parameters
NSize of the string literal including the null terminator.

The documentation for this class was generated from the following file: