PrevUpHomeNext

Function template bidirectional_subranges

boost::text::v1::bidirectional_subranges

Synopsis

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


template<code_point_iter I, std::sentinel_for< I > S> 
  unspecified bidirectional_subranges(I first, S last, 
                                      int paragraph_embedding_level = -1);

Description

Returns a view of code point subranges in [first, last); each subrange is one of three kinds: a forward-subrange; a reverse-subrange; or a one-code-point subrange used to subtitute a reversed bracketing code point (e.g. <lsquo></lsquo><rsquo></rsquo>[') for its couterpart (e.g.']'`). There is a single iterator type used in the resulting subranges, so this distinction is not exposed in the subrange API.

Line breaks are determined within the algorithm by calling lines(first, last); only hard line breaks are considered.

If a non-negative paragraph_embedding_level is provided, it will be used instead of the initial paragraph embedding level computed by the bidirectional algorithm. This applies to all paragraphs found in [first, last).

Code points that are used to control the left-to-right or right-to-left direction of code points within the text will not appear in the output. The Unicode bidirectional algorithm specifies that code points with classes RLE, LRE, RLO, LRO, PDF, and BN not appear in the output; this implementation additionally removes code points with classes FSI, LRI, RLI, and PDI.


PrevUpHomeNext