Skip to main content

split_at_order

Function split_at_order 

Source
pub fn split_at_order(text: &str) -> (String, Option<String>)
Expand description

Split a comprehension text on the top-level order keyword. Returns (head, Some(order_spec)) if an order clause is present at paren-depth 0, or (text, None) otherwise. The order keyword is consumed; the spec is trimmed.