repat / censor-text
Help search and replace specific texts, such as email address(es).
Installs: 1 425
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- php: >=5.6
This package is auto-updated.
Last update: 2024-11-20 00:22:59 UTC
README
censor-text is a package to help search and replace specific texts, such as email address(es).
Installation
$ composer require repat/censor-text
Documentation
// Init $text = new \Repat\Text(); // With Setter $text->setText('My email address is foobar@example.com'); $text->censorEmail(); // returns: 'My email address is ******************' // Chain $text->setText('My email address is foobar@example.com')->censorEmail(); // In Constructor $text = new \Repat\Text('My email address is foobar@example.com'); // Exchange censoring character $text->censorEmail("❚"); // returns: My email address is ❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚ // Laravel $text = resolve(\Repat\Text::class); $text->setText('My email address is foobar@example.com')->censorEmail(); // Helper function censor_email('My email address is foobar@example.com'); censor_email('My email address is foobar@example.com', "❚");
License
- MIT, see LICENSE
Version
- Version 0.1
Contact
repat
- Homepage: https://repat.de
- e-mail: repat@repat.de
- Twitter: @repat123