Crate arabic_reshaper[][src]

arabic_reshaper

Reconstruct Arabic sentences to be used in applications that don't support Arabic script.

This crate exposes 2 functions:

arabic_reshape_l :

Reshape letters and reverse their orders so they can be used in left-right context. (you'll probably use most)

extern crate arabic_reshaper;
use arabic_reshaper::arabic_reshape_l;
let salam = "سلام";
println!("{}",arabic_reshape_l(salam));
// سلام correctly rendred.

arabic_reshape_r:

Only reshapes letters, to be used in a right-left context that doesn't correctly support arabic.

extern crate arabic_reshaper;
use arabic_reshaper::arabic_reshape_r;
let text = "اللغة العربية رائعة";
println!("{}",arabic_reshape_r(text));
// الغة العربية رائعة correctly rendred.

More info:

Check the original python version.

python-arabic-reshaper

Functions

arabic_reshape_l
arabic_reshape_r