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_t * | data () const |
| constexpr size_t | size () const |
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.
| Count | The exact number of decoded codepoints. |