Ansi-string

Latest version: v1.0.5

Safety actively analyzes 623368 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

1.0.5

- Added `AnsiString.remove_formatting()` to remove selected formatting for given range
- Added `AnsiString.unformat_matching()` to remove formatting for a given match specification
- Added `count` parameter to `AnsiString.format_matching()` and `AnsiString.unformat_matching()`
- Commented all public methods

1.0.4

- Help make things more clear by removing items from AnsiFormat which shouldn't be used directly
- Values in AnsiFormat are now either integers or lists of integers with setting property which returns a unique AnsiSetting
- Added double underline color handling

1.0.3

- Fixed another concatenation bug
- Expose AnsiSetting since there are some useful external use-cases
- An AnsiSetting object may now be given to the constructor of AnsiString
- The return value of AnsiFormat.rgb() is now an AnsiSetting
- Define AnsiFormat. fg_rgb(), bg_rgb(), and ul_rgb() to match string definition variants
- Moved several classes from inside AnsiString to the outside the class so they can be completely hidden from the module (to reduce confusion)
- Added some more doc strings
- Updated README & examples image to explain direct specification of setting values is not advised (always use AnsiFormat unless there is a specific reason not to)

1.0.2

- Fixed issues with replace() and upper()

1.0.1

- Added format_matching()
- Updated README

1.0.0

- Fixed many concatenation bugs
- Concatenated string formattings are now simplified if the RHS string contains same formatting as LHS
- Added partition(), rpartition(), settings_at(), removeprefix(), removesuffix(), replace(), rfind(), rindex(), split(), rsplit(), splitlines(), swapcase(), title(), and zfill()
- Refactoring for better code readability
- Updated README

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.