nu_utils

Function strip_ansi_string_unlikely

Source
pub fn strip_ansi_string_unlikely(string: String) -> String
Expand description

Removes ANSI escape codes and some ASCII control characters

Optimized for strings that rarely contain ANSI control chars. Uses fast search to avoid reallocations.

Keeps \n removes \r, \t etc.

If parsing fails silently returns the input string