Splits a string in the format "surah:ayah" or "surah:ayah-ayah" into its numeric components.
The input string to parse in the format "surah:ayah" or "surah:ayah-ayah"
An object containing the parsed numbers: - surahOrAyah: The surah number - ayah: The first or only ayah number - ayahTo: The ending ayah number (if range specified)
When the input string format is invalid or contains non-numeric values
string2NumberSplitterStrict("2:255") // returns { surahOrAyah: 2, ayah: 255, ayahTo: NaN }string2NumberSplitterStrict("2:255-260") // returns { surahOrAyah: 2, ayah: 255, ayahTo: 260 } Copy
string2NumberSplitterStrict("2:255") // returns { surahOrAyah: 2, ayah: 255, ayahTo: NaN }string2NumberSplitterStrict("2:255-260") // returns { surahOrAyah: 2, ayah: 255, ayahTo: 260 }
Splits a string in the format "surah:ayah" or "surah:ayah-ayah" into its numeric components.