#pragma once #include #include #include #include namespace Echoion::Core::Util { // Split `text` into pages no larger than `limit` bytes each, breaking on // line boundaries where possible and hard-splitting over-long lines on a // UTF-8 code-point boundary. Every returned page is <= `limit` bytes, so a // caller can append a short footer and still stay under the transport's // single-message cap. Returns a single element when `text` already fits. std::vector paginate(std::string_view text, std::size_t limit); } // namespace Echoion::Core::Util