Closed YiNNx closed 5 months ago
I figured out that the .to_string()
conversion is causing the result length to change:The string "test" was converted to "\u{1b}[32mtest\u{1b}[0m", resulting in a change in length. This is likely expected behavior, so I'm going to close this issue.
Description
The
len()
function applied to a string colored usingcolored::Colorize
returns unexpected results when used withinformat!
.Code Example
Output
Expected Behavior
format_len
should be the same as the other lengths.Environment
colored
: v2.1.0