ICU4X
International Components for Unicode
Loading...
Searching...
No Matches
ICU4XBidiParagraph Class Reference

#include <ICU4XBidiParagraph.hpp>

Public Member Functions

diplomat::result< std::monostate, ICU4XErrorset_paragraph_in_text (size_t n)
 
ICU4XBidiDirection direction () const
 
size_t size () const
 
size_t range_start () const
 
size_t range_end () const
 
template<typename W>
diplomat::result< std::monostate, ICU4XErrorreorder_line_to_writeable (size_t range_start, size_t range_end, W &out) const
 
diplomat::result< std::string, ICU4XErrorreorder_line (size_t range_start, size_t range_end) const
 
uint8_t level_at (size_t pos) const
 
 ICU4XBidiParagraph (capi::ICU4XBidiParagraph *i)
 
 ICU4XBidiParagraph ()=default
 
 ICU4XBidiParagraph (ICU4XBidiParagraph &&) noexcept=default
 
ICU4XBidiParagraphoperator= (ICU4XBidiParagraph &&other) noexcept=default
 

Detailed Description

Bidi information for a single processed paragraph

Constructor & Destructor Documentation

◆ ICU4XBidiParagraph() [1/3]

ICU4XBidiParagraph::ICU4XBidiParagraph ( capi::ICU4XBidiParagraph * i)
inlineexplicit

◆ ICU4XBidiParagraph() [2/3]

ICU4XBidiParagraph::ICU4XBidiParagraph ( )
default

◆ ICU4XBidiParagraph() [3/3]

ICU4XBidiParagraph::ICU4XBidiParagraph ( ICU4XBidiParagraph && )
defaultnoexcept

Member Function Documentation

◆ direction()

ICU4XBidiDirection ICU4XBidiParagraph::direction ( ) const
inline

The primary direction of this paragraph

See the Rust documentation for level_at for more information.

◆ level_at()

uint8_t ICU4XBidiParagraph::level_at ( size_t pos) const
inline

Get the BIDI level at a particular byte index in this paragraph. This integer is conceptually a unicode_bidi::Level, and can be further inspected using the static methods on ICU4XBidi.

Returns 0 (equivalent to Level::ltr()) on error

See the Rust documentation for level_at for more information.

◆ operator=()

ICU4XBidiParagraph & ICU4XBidiParagraph::operator= ( ICU4XBidiParagraph && other)
defaultnoexcept

◆ range_end()

size_t ICU4XBidiParagraph::range_end ( ) const
inline

The end index of this paragraph within the source text

◆ range_start()

size_t ICU4XBidiParagraph::range_start ( ) const
inline

The start index of this paragraph within the source text

◆ reorder_line()

diplomat::result< std::string, ICU4XError > ICU4XBidiParagraph::reorder_line ( size_t range_start,
size_t range_end ) const
inline

Reorder a line based on display order. The ranges are specified relative to the source text and must be contained within this paragraph's range.

See the Rust documentation for level_at for more information.

◆ reorder_line_to_writeable()

template<typename W>
diplomat::result< std::monostate, ICU4XError > ICU4XBidiParagraph::reorder_line_to_writeable ( size_t range_start,
size_t range_end,
W & out ) const
inline

Reorder a line based on display order. The ranges are specified relative to the source text and must be contained within this paragraph's range.

See the Rust documentation for level_at for more information.

◆ set_paragraph_in_text()

diplomat::result< std::monostate, ICU4XError > ICU4XBidiParagraph::set_paragraph_in_text ( size_t n)
inline

Given a paragraph index n within the surrounding text, this sets this object to the paragraph at that index. Returns ICU4XError::OutOfBoundsError when out of bounds.

This is equivalent to calling paragraph_at() on ICU4XBidiInfo but doesn't create a new object

◆ size()

size_t ICU4XBidiParagraph::size ( ) const
inline

The number of bytes in this paragraph

See the Rust documentation for len for more information.


The documentation for this class was generated from the following file: