Expand description
A wrapper around a few functions to make finding and replacing keys inside a string easier.
Structs§
- Ansi
- Escape whatever’s being sent in here to an ansi code
- Formatter
- Heavier formatter that allows the possibility of
custom styles in strings. That is the only reason
this struct exists, if you don’t need custom things
just use the
colorize_string()function provided in the module.
Enums§
- LogIcon
- Contains definitions for icons that can be used in the terminal. See this github repo for an entire list. Use this in combination with printing macros.
Functions§
- colorize_
string - Finds all keys in the given input. Keys meaning
whatever the logger uses. Something that looks like
<key>. And replaces all those keys with their color, style or icon equivalent. - format_
string - Finds all keys in the given input. If with_colors is true, it will replace all keys with their respective ANSI color code. Otherwise it will only replace the keys with an empty string.