PrevUpHomeNext

Function template lines

boost::text::v1::lines

Synopsis

// In header: <boost/text/line_break.hpp>


template<code_point_range R, typename Extent, 
         line_break_cp_extent_func< std::ranges::iterator_t< R >, Extent > ExtentFunc> 
  unspecified lines(R && r, Extent max_extent, ExtentFunc cp_extent, 
                    bool break_overlong_lines = true);

Description

Returns a view of the code point ranges in r delimiting lines. A line that does not end in a hard break will end in a allowed break that does not exceed max_extent, using the code point extents derived from ExtentFunc. When a line has no allowed breaks before it would exceed max_extent, it will be broken only if break_overlong_lines is true. If break_overlong_lines is false, such an unbreakable line will exceed max_extent. The result is returned as a borrowed_view_t in C++20 and later.

Returns a view of the grapheme ranges in r delimiting lines. A line that does not end in a hard break will end in a allowed break that does not exceed max_extent, using the code point extents derived from ExtentFunc. When a line has no allowed breaks before it would exceed max_extent, it will be broken only if break_overlong_lines is true. If break_overlong_lines is false, such an unbreakable line will exceed max_extent. The result is returned as a borrowed_view_t in C++20 and later.


PrevUpHomeNext