Expand description
Apply colours and styling to strings.
Enumsยง
- Background
Color ๐
Functionsยง
- apply_
colors ๐ - apply_
header_ ๐color - apply_
line ๐Return a copy oflinewith styles applied to all the spans specified. - Find the largest byte offset in
sthat gives the longest starting substring whose display width does not exceedwidth. - color_
positions ๐ - group_
by_ ๐line - header ๐
- merge_
adjacent ๐Merge spans where the end of one span matches the start of the next span. - novel_
style ๐ - print_
error ๐Stylesas an error and write to stderr. - print_
warning ๐Stylesas a warning and write to stderr. - replace_
tabs ๐Return a copy ofsrcwith all the tab characters replaced bytab_widthstrings. - split_
and_ ๐apply Splitline(from the source code) into multiple lines ofmax_len(i.e. word wrapping), and applystylesto each part according to its original position inline. - Split a string into parts whose display length does not exceed
max_width. - style_
lines ๐Apply theStyles to the spans specified. Return a vec of the styled strings, including trailing newlines. - substring_
by_ ๐byte