class

CArcUtf8

Module
Arc
Header
#include "Arc/Text/CArcTextLayout.h"
Namespace
Arcf

Constructors

SignatureNameDescription
CArcUtf8() = deleteCArcUtf8

Public functions

ReturnsNameDescription
uint32_tDecodeDecodes one codepoint and advances ptr.
voidAppend
int32_tPrevCharByte-offset navigation over CODEPOINT boundaries — the primitive for walking bytes, not for moving a caret: a caret stepped this way lands between a letter and its accent and splits flags and ZWJ emoji.
int32_tNextChar
int32_tPrevGraphemeCaret steps: extended grapheme clusters (UAX #29) for arrows, Backspace and Delete; word starts (UAX #29) for Ctrl+Arrow.
int32_tNextGrapheme
int32_tPrevWord
int32_tNextWord

Function details

CArcUtf8

C++
CArcUtf8() = delete

Decode

C++
static uint32_t Decode(const char*& ptr, const char* end)

Decodes one codepoint and advances ptr. Returns 0xFFFD on malformed input: a bad lead byte, a truncated sequence, an overlong form, a surrogate or a value past U+10FFFF.

Append

C++
static void Append(std::string& str, uint32_t codepoint)

PrevChar

C++
static int32_t PrevChar(const std::string& s, int32_t pos)

Byte-offset navigation over CODEPOINT boundaries — the primitive for walking bytes, not for moving a caret: a caret stepped this way lands between a letter and its accent and splits flags and ZWJ emoji.

NextChar

C++
static int32_t NextChar(const std::string& s, int32_t pos)

PrevGrapheme

C++
static int32_t PrevGrapheme(const std::string& s, int32_t pos)

Caret steps: extended grapheme clusters (UAX #29) for arrows, Backspace and Delete; word starts (UAX #29) for Ctrl+Arrow.

NextGrapheme

C++
static int32_t NextGrapheme(const std::string& s, int32_t pos)

PrevWord

C++
static int32_t PrevWord(const std::string& s, int32_t pos)

NextWord

C++
static int32_t NextWord(const std::string& s, int32_t pos)
Generated from Arc/Text/CArcTextLayout.h via arc.json · Nov 5, 2026Version 1.0.0