-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
13 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# anstrip | ||
|
||
anstrip is a minimal library to strip ANSI sequences from strings. | ||
|
||
It provides: | ||
|
||
- `PATTERN`, the regex pattern used by the functions of anstrip | ||
- `strip`, a function to remove all the escape sequences from a string | ||
- `auto_strip`, a function that is similar to `strip`, except that it only removes if the output is a TTY | ||
- `auto_print`, a function that is `print` but with sequence auto-stripping | ||
- `printed_length`, a function that returns the length of the string as seen on the screen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters