Reference · Rules and helpers · rules.rs

parse_page_range Function

"2, 5-7, 10-" (1-based, as typed) → 0-based pages in order, no repeats. "5-" runs to the last page, "-3" from the first. None when a part does not parse or lies outside 1…count.

func parsePageRange(text: String, count: UInt32) -> [UInt32]?

Parameters

NameTypeSwift / C#
textStringtext
countu32count

Returns

Option<Vec<u32>>

Errors

Does not throw.

Signatures are generated from the engine’s code. Swift is checked against the generated bindings; C# follows the bindings generator’s naming rules.