class
CArcTextBreak
- Module
- Arc
- Header
#include "Arc/Text/CArcTextBreak.h"- Namespace
Arcf
Type aliases
| Alias | Description |
|---|---|
using FDictionaryWordStarts = bool (*)(const char16_t* text, uint32_t length, uint8_t* outWordStart) | The dictionary word breaker for scripts written without spaces — Thai, Lao, Khmer, Myanmar, Tai Tham, New Tai Lue. UTF-16 in, one word-start flag per code unit out, both buffers the caller's. With none installed those scripts break per character (UAX #29's default) and never wrap inside a run; the Mowo bridge installs the PAL's. |
Constructors
| Signature | Name | Description |
|---|---|---|
CArcTextBreak() = delete | CArcTextBreak |
Public functions
| Returns | Name | Description |
|---|---|---|
EArcGraphemeBreak | GraphemeBreakOf | |
EArcWordBreak | WordBreakOf | |
void | GraphemeBoundaries | Every grapheme cluster boundary, as byte offsets, 0 and the length included. |
int32_t | NextGrapheme | The next / previous cluster boundary from a byte offset — what an arrow key, Backspace or Delete steps by. |
int32_t | PrevGrapheme | |
void | WordBoundaries | Every word boundary, as byte offsets, 0 and the length included. |
int32_t | NextWordStart | Ctrl+Right / Ctrl+Left: the start of the next word after the offset (or the end of the text) and the start of the word before it (or 0). |
int32_t | PrevWordStart | |
void | WordAt | The word segment containing a byte offset: a double-click selection. |
bool | ValidateTables | |
void | SetDictionaryWordBreaker | |
bool | IsDictionaryScript | |
bool | DictionaryWordStarts | One flag per codepoint of the run: 1 where the installed breaker starts a word. |
Function details
CArcTextBreak
C++
CArcTextBreak() = deleteGraphemeBreakOf
C++
static EArcGraphemeBreak GraphemeBreakOf(uint32_t codepoint)WordBreakOf
C++
static EArcWordBreak WordBreakOf(uint32_t codepoint)GraphemeBoundaries
C++
static void GraphemeBoundaries(const std::string& text, std::vector<uint32_t>& outOffsets)Every grapheme cluster boundary, as byte offsets, 0 and the length included.
NextGrapheme
C++
static int32_t NextGrapheme(const std::string& text, int32_t byteOffset)The next / previous cluster boundary from a byte offset — what an arrow key, Backspace or Delete steps by.
PrevGrapheme
C++
static int32_t PrevGrapheme(const std::string& text, int32_t byteOffset)WordBoundaries
C++
static void WordBoundaries(const std::string& text, std::vector<uint32_t>& outOffsets)Every word boundary, as byte offsets, 0 and the length included.
NextWordStart
C++
static int32_t NextWordStart(const std::string& text, int32_t byteOffset)Ctrl+Right / Ctrl+Left: the start of the next word after the offset (or the end of the text) and the start of the word before it (or 0). Whitespace and punctuation segments are stepped over.
PrevWordStart
C++
static int32_t PrevWordStart(const std::string& text, int32_t byteOffset)WordAt
C++
static void WordAt(const std::string& text, int32_t byteOffset, int32_t& outStart, int32_t& outEnd)The word segment containing a byte offset: a double-click selection.
ValidateTables
C++
static bool ValidateTables()SetDictionaryWordBreaker
C++
static void SetDictionaryWordBreaker(FDictionaryWordStarts breaker)IsDictionaryScript
C++
static bool IsDictionaryScript(uint32_t codepoint)DictionaryWordStarts
C++
static bool DictionaryWordStarts(const uint32_t* codepoints, size_t count, std::vector<uint8_t>& outStarts)One flag per codepoint of the run: 1 where the installed breaker starts a word. False, outStarts empty, without a breaker.
Generated from Arc/Text/CArcTextBreak.h via arc.json · Nov 5, 2026Version 1.0.0