You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get the ansi string from another process and display it in my rich text box, so I need to parse the ansi control codes.
Now I use AnsiCodeIterator to get each element, is there a way to parse it to get what kind of style it is?
fnmain(){let ansi_str = style("Hello world!").force_styling(true).red().on_blue().bold().to_string();println!("{:?}", ansi_str);AnsiCodeIterator::new(&ansi_str).for_each(|ansi_code| {println!("{:?}", ansi_code.0);// how to convert ansi code to style?// such as let style = Style::from_ansi_code(ansi_code.0);// but this method is not implemented});}
The text was updated successfully, but these errors were encountered:
I get the ansi string from another process and display it in my rich text box, so I need to parse the ansi control codes.
Now I use AnsiCodeIterator to get each element, is there a way to parse it to get what kind of style it is?
The text was updated successfully, but these errors were encountered: