Expand description
Update API for version 3.0 of the crate.
To start using v3, import the items with cansi::v3::*. This way, moving to version 3.0 will
only require a change in import code.
Note that version 3.0 will remove the deprecated version 2.0 items.
Re-exports§
Structs§
- Categorised
Line Iterator - An iterator structure for
CategorisedSlices, iterating over each new line (\nor\r\n) and returns the categorised slices within those.CategorisedSlices that include a new line are split with the same style. - Categorised
Slice - Data structure that holds information about colouring and styling of a text slice.
Functions§
- categorise_
text - Parses the text and returns each formatted slice in order. The ANSI escape codes are not included in the text slices.
- construct_
text_ no_ codes - Constructs a string of the categorised text without the ANSI escape characters.
- line_
iter - Construct an iterator over each new line (
\nor\r\n) and returns the categorised slices within those.CategorisedSlices that include a new line are split with the same style.
Type Aliases§
- Categorised
Line - The item type of
CategorisedLineIterator. - Categorised
Slices - Type definition of the collection of
CategorisedSlices.