40 releases (1 stable)

1.0.0 Oct 2, 2024
0.12.2 Apr 8, 2024
0.11.5 Mar 23, 2024
0.10.7 May 24, 2023
0.7.3 Nov 29, 2022

#403 in Text processing

Download history 4/week @ 2024-07-04 44/week @ 2024-07-25 2/week @ 2024-08-01 64/week @ 2024-09-19 78/week @ 2024-09-26 70/week @ 2024-10-03 7/week @ 2024-10-10

219 downloads per month

Apache-2.0

260KB
655 lines

[Quranize] encodes alphabetic text into quran text, a.k.a. transliteration.

Examples

Adding crate quranize to a project's dependencies

Run cargo add quranize, or add the following lines to Cargo.toml file.

[dependencies]
quranize = "1.0"

Encoding alphabetic text to quran text

let q = quranize::Quranize::new();

assert_eq!(q.encode("bismillahirrohmanirrohim")[0].0, "بِسمِ اللَّهِ الرَّحمـٰنِ الرَّحيم");
assert_eq!(q.encode("amma yatasa alun")[0].0, "عَمَّ يَتَساءَلون");

let (i, _) = q.find("عَمَّ يَتَساءَلون")[0];
let sura = q.get_sura(i).unwrap();
let aya = q.get_aya(i).unwrap();
assert_eq!((sura, aya), (78, 1));

No runtime deps