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

#487 in Text processing

Download history 6/week @ 2024-09-17 64/week @ 2024-09-24 137/week @ 2024-10-01 12/week @ 2024-10-08 4/week @ 2024-11-26 45/week @ 2024-12-03 52/week @ 2024-12-10 10/week @ 2024-12-24

62 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