https://github.com/vcruly/maskercat
https://github.com/vcruly/maskercat
concatenation masking mit-license open-source php pure-php string string-manipulation strings
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/vcruly/maskercat
- Owner: vcruly
- License: mit
- Created: 2023-09-13T01:37:28.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-25T02:54:06.000Z (almost 3 years ago)
- Last Synced: 2025-11-27T16:27:30.600Z (7 months ago)
- Topics: concatenation, masking, mit-license, open-source, php, pure-php, string, string-manipulation, strings
- Language: PHP
- Homepage:
- Size: 24.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# maskercat - Custom string concatenation mask
Concatenate a set of pre-define or custom character, strings or patterns to an given String, resulting in a mask of characters in the front, back, or both sides of the input.
[](https://opensource.org/licenses/MIT)
## Installation
`composer require rvc/maskercat`
or just download and include the file in your project.
## Usage
### Simple masker
`masker (String string, int lenght, int mask, String side);`
Options:
Parameter
Values
Description
Optional
string
The string to concatenate
Require
lenght
7 (DEFAULT)
Lenght of the mask use to concatenate
Optional
mask
- 0 - abcdefghijklmnopqrstuvwxyz (DEFAULT)
- 1 - ABCDEFGHIJKLMNOPQRSTUVWXYZ
- 2 - 0123456789abcdefghijklmnopqrstuvwxyz
- 3 - 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ
- 4 - 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
Mask use to concatenate
Optional
mask
- left (DEFAULT)
- right
- both
Side of the string to put the mask
Optional
Example:
```
masker('Hakuna matata');
output: pgdfbiihakuna matata
```
### Custom masker
`custom_masker (String string, int lenght, String mask, String side)`
Options:
Parameter
Values
Description
Optional
string
The string to concatenate
Require
lenght
Lenght of the mask use to concatenate
Require
mask
Mask use to concatenate
Require
side
- left (DEFAULT)
- right
- both
Side of the string to put the mask
Optional
Example:
```
custom_masker('Hakuna matata', 7, 'abcd453gh', 'right' );
output: `Hakuna matatab5gdccc`
```
## License
maskercat is licensed under the MIT License.