Function cansi::categorise_text

source ·
pub fn categorise_text(text: &str) -> CategorisedSlices<'_>
👎Deprecated: please use v3::categorise_text to move to API v3.0. this function will be removed with v3.0 of cansi
Expand description

Parses the text and returns each formatted slice in order. The ANSI escape codes are not included in the text slices.

Each different text slice is returned in order such that the text without the escape characters can be reconstructed. There is a helper function (construct_text_no_codes) on CategorisedSlices for this.