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 |
#277 in Text processing
2,056 downloads per month
260KB
655 lines
Quranize
Transform transliterations into quran forms.
Web App
Related Projects
Former version of this project
License
Licensed under
- Apache License, Version 2.0 (LICENSE or http://www.apache.org/licenses/LICENSE-2.0)
lib.rs
:
[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));