Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
text_overflow.hpp File Reference
#include <pulp/canvas/canvas.hpp>
#include <string>
#include <string_view>

Go to the source code of this file.

Namespaces

namespace  pulp
namespace  pulp::view
 Hover-cursor tracking for platform window hosts.

Functions

std::size_t pulp::view::utf8_advance (std::string_view text, std::size_t count)
 Walk forward over UTF-8 leading bytes.
std::size_t pulp::view::utf8_codepoint_count (std::string_view text)
 Count the number of UTF-8 leading-byte codepoints in text.
std::string pulp::view::truncate_to_width (canvas::Canvas &canvas, std::string_view text, float available_width, bool force_ellipsis=false)
 If text already fits within available_width, return it as-is unless force_ellipsis is true.

Variables

constexpr const char * pulp::view::kEllipsis = "\xe2\x80\xa6"
 UTF-8 horizontal ellipsis character (U+2026, "…").