https://github.com/jojoee/strblackout
String replacement or Blackout text with *** e.g. 08*****123
https://github.com/jojoee/strblackout
blackout string
Last synced: 7 months ago
JSON representation
String replacement or Blackout text with *** e.g. 08*****123
- Host: GitHub
- URL: https://github.com/jojoee/strblackout
- Owner: jojoee
- License: mit
- Created: 2021-09-14T10:28:40.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-09-14T12:53:31.000Z (almost 5 years ago)
- Last Synced: 2025-01-28T14:53:40.971Z (over 1 year ago)
- Topics: blackout, string
- Language: Python
- Homepage: https://pypi.org/project/strblackout/
- Size: 10.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# strblackout
[](https://github.com/jojoee/strblackout/actions/workflows/continuous-integration.yml)
[](https://pypi.python.org/pypi/strblackout/)
[](https://opensource.org/licenses/MIT)
[](https://codecov.io/gh/jojoee/strblackout)
String replacement or Blackout text with *** e.g. 08*****123
## Installation
```
pip install strblackout
```
## Usage
```python
from strblackout import blackout
blackout("123456789") == "123456789"
blackout("123456789", left=5) == "*****6789"
blackout("123456789", right=3) == "123456***"
blackout("123456789", left=3, replacement="x") == "xxx456789"
blackout("123", left=10, right=20) == "***"
```