ICU4X
International Components for Unicode
|
#include <Bidi.d.hpp>
Public Member Functions | |
std::unique_ptr< icu4x::BidiInfo > | for_text (std::string_view text, std::optional< uint8_t > default_level) const |
std::unique_ptr< icu4x::ReorderedIndexMap > | reorder_visual (diplomat::span< const uint8_t > levels) const |
Static Public Member Functions | |
static std::unique_ptr< icu4x::Bidi > | create () |
static diplomat::result< std::unique_ptr< icu4x::Bidi >, icu4x::DataError > | create_with_provider (const icu4x::DataProvider &provider) |
static bool | level_is_rtl (uint8_t level) |
static bool | level_is_ltr (uint8_t level) |
static uint8_t | level_rtl () |
static uint8_t | level_ltr () |
static void | operator delete (void *ptr) |
An ICU4X Bidi object, containing loaded bidi data
See the Rust documentation for BidiClass
for more information.
|
inlinestatic |
Creates a new Bidi
from locale data using compiled data.
|
inlinestatic |
Creates a new Bidi
from locale data, and a particular data source.
|
inline |
Use the data loaded in this object to process a string and calculate bidi information
Takes in a Level for the default level, if it is an invalid value or None it will default to Auto.
Returns nothing if text
is invalid UTF-8.
See the Rust documentation for new_with_data_source
for more information.
|
inlinestatic |
Check if a Level returned by level_at is an LTR level.
Invalid levels (numbers greater than 125) will be assumed LTR
See the Rust documentation for is_ltr
for more information.
|
inlinestatic |
Check if a Level returned by level_at is an RTL level.
Invalid levels (numbers greater than 125) will be assumed LTR
See the Rust documentation for is_rtl
for more information.
|
inlinestatic |
Get a simple LTR Level value
See the Rust documentation for ltr
for more information.
|
inlinestatic |
Get a basic RTL Level value
See the Rust documentation for rtl
for more information.
|
inlinestatic |
|
inline |
Utility function for producing reorderings given a list of levels
Produces a map saying which visual index maps to which source index.
The levels array must not have values greater than 126 (this is the Bidi maximum explicit depth plus one). Failure to follow this invariant may lead to incorrect results, but is still safe.
See the Rust documentation for reorder_visual
for more information.