| title | ansi strip |
|---|---|
| categories | platform |
| version | 0.112.0 |
| platform | Strip ANSI escape sequences from a string. |
| usage | Strip ANSI escape sequences from a string. |
| editLink | false |
| contributors | false |
ansi strip for platform
Strip ANSI escape sequences from a string.
> ansi strip {flags} ...rest
...rest: For a data structure input, remove ANSI sequences from strings at the given cell paths.
| input | output |
|---|---|
| string | string |
| list<string> | list<string> |
| table | table |
| record | record |
Strip ANSI escape sequences from a string
> $'(ansi green)(ansi cursor_on)hello' | ansi strip
helloStrip ANSI escape sequences from a record field
> { greeting: $'hello (ansi red)world' exclamation: false } | ansi strip greeting
╭─────────────┬─────────────╮
│ greeting │ hello world │
│ exclamation │ false │
╰─────────────┴─────────────╯Strip ANSI escape sequences from multiple table columns
> [[language feature]; [$'(ansi red)rust' $'(ansi i)safety']] | ansi strip language feature
╭───┬──────────┬─────────╮
│ # │ language │ feature │
├───┼──────────┼─────────┤
│ 0 │ rust │ safety │
╰───┴──────────┴─────────╯