Formats a surah/ayah reference as a string. This is the inverse of ayahStringSplitter.
ayahStringSplitter
[surah, ayah] or [surah, [fromAyah, toAyah]]
[surah, ayah]
[surah, [fromAyah, toAyah]]
Text between surah and ayah, ":" by default
":"
The reference as "surah:ayah" or "surah:from-to"
"surah:ayah"
"surah:from-to"
formatSurahAyah([2, 255]) // "2:255"formatSurahAyah([1, [1, 7]]) // "1:1-7"formatSurahAyah([2, 255], ".") // "2.255"formatSurahAyah(ayahStringSplitter("18:1-10")) // "18:1-10" Copy
formatSurahAyah([2, 255]) // "2:255"formatSurahAyah([1, [1, 7]]) // "1:1-7"formatSurahAyah([2, 255], ".") // "2.255"formatSurahAyah(ayahStringSplitter("18:1-10")) // "18:1-10"
Formats a surah/ayah reference as a string. This is the inverse of
ayahStringSplitter.