PrevUpHomeNext

Function template prev_word_break

boost::text::v1::prev_word_break

Synopsis

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


template<code_point_range R, word_prop_func WordPropFunc = word_prop_callable, 
         word_break_func WordBreakFunc = untailored_word_break> 
  std::ranges::borrowed_iterator_t< R > 
  prev_word_break(R && r, std::ranges::iterator_t< R > it, 
                  WordPropFunc const & word_prop = WordPropFunc{}, 
                  WordBreakFunc const & word_break = WordBreakFunc{});

Description

Finds the nearest word break at or before before it. If it == r.begin(), that is returned. Otherwise, the first code point of the word that it is within is returned (even if it is already at the first code point of a word).

See the Text Segmentation section of the tutorial for WordPropFunc semantics.

Returns a grapheme_iterator to the nearest word break at or before before it. If it == r.begin(), that is returned. Otherwise, the first grapheme of the word that it is within is returned (even if it is already at the first grapheme of a word).

See the Text Segmentation section of the tutorial for WordPropFunc semantics.


PrevUpHomeNext