Expand description
Utilities functions to work with components
Functions§
- borrow_
clone_ line - Convert a
&Lineto aLineby usingCow::Borrowed. - borrow_
clone_ span - Convert a
&Spanto aSpanby usingCow::Borrowed. - borrow_
clone_ text - Convert a
&Textto aTextby usingCow::Borrowed. - calc_
utf8_ cursor_ position - Calculate the actual amount of terminal space taken up, taking into account UTF things like multi-width, undrawn and combinatory characters.
- get_
block - Construct a
Blockwidget from the given properties. - wrap_
lines - Wrap the given lines to fit within
width. - wrap_
spans - Given a vector of
Spans, it creates a list ofSpanswhich mustn’t exceed the provided width parameter. EachLinein the returnedVecis a line in the text.