insightdock::charts::detail::wrap_text

Wrap words and long tokens using a caller-provided width measurement.

Synopsis

Declared in <insightdock/detail/text_wrap.h>
template<typename Measure>
std::vector<std::string>
wrap_text(
    std::string const& text,
    double max_width,
    Measure measure);

Description

Valid UTF-8 tokens are split only between code points. Explicit newlines preserve paragraph boundaries, including empty lines. A code point wider than the limit occupies its own line. This does not implement grapheme segmentation or complex-script shaping.

Return Value

A standard container which offers fixed time access to individual elements in any order.

Created with MrDocs