libpromeki main
PROfessional MEdia toolKIt
 
Loading...
Searching...
No Matches
CompiledCodepoints< Count > Class Template Reference

Right-sized codepoint array extracted from a CompiledString. More...

#include <string.h>

Public Member Functions

template<size_t N>
consteval CompiledCodepoints (const CompiledString< N > &cs)
 
constexpr const char32_tdata () const
 
constexpr size_t size () const
 

Detailed Description

template<size_t Count>
class CompiledCodepoints< Count >

Right-sized codepoint array extracted from a CompiledString.

CompiledString<N> allocates N codepoints (worst case), but a UTF-8 string with N bytes has at most N-1 codepoints and usually far fewer. This class copies only the actual codepoints into a correctly-sized constexpr array, so the oversized CompiledString can be optimized away.

Template Parameters
CountThe exact number of decoded codepoints.

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