bidi 0.1.1

Implementation of the Unicode Bidirectional Algorithm (UBA).
Documentation
  • Coverage
  • 33.33%
    2 out of 6 items documented0 out of 3 items with examples
  • Size
  • Source code size: 2.09 MB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.33 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • xclud/rust-bidi
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • xclud

Implementation of the Unicode Bidirectional Algorithm (UBA).

Reference: http://www.unicode.org/reports/tr9/.

Converts logical strings to their equivalent visual representation. Persian, Hebrew and Arabic languages (and any other RTL language) are supported.

use bidi:*;

let text: &str = "مهدی";
let mut text_u16 = text.encode_utf16().collect::<Vec<u16>>();

perform_shaping(&mut text_u16);

let result = String::from_utf16(text_u16.as_slice()).unwrap();
assert_eq!(result, "ﻣﻬﺪﯼ");