Function pango::find_paragraph_boundary [−][src]
pub fn find_paragraph_boundary(text: &str) -> (i32, i32)
Expand description
Locates a paragraph boundary in text. A boundary is caused by
delimiter characters, such as a newline, carriage return, carriage
return-newline pair, or Unicode paragraph separator character. The
index of the run of delimiters is returned in
paragraph_delimiter_index. The index of the start of the paragraph
(index after all delimiters) is stored in next_paragraph_start.
If no delimiters are found, both paragraph_delimiter_index and
next_paragraph_start are filled with the length of text (an index one
off the end).
text
UTF-8 text
length
length of text in bytes, or -1 if nul-terminated
Returns
paragraph_delimiter_index
return location for index of delimiter
next_paragraph_start
return location for start of next paragraph