Skip to main content

split

Function split 

Source
pub fn split(paragraph: &Element, at: usize) -> (Element, Element)
Expand description

Split a paragraph at a character offset into the paragraph before it and the paragraph after, each with the original’s style and attributes.

A zero-length element at the split point stays with the first half. The second half drops any xml:id or text:id, which name one element and cannot name two.