https://github.com/codemasher/php-uwuify
String uwuifying library for PHP
https://github.com/codemasher/php-uwuify
Last synced: 5 months ago
JSON representation
String uwuifying library for PHP
- Host: GitHub
- URL: https://github.com/codemasher/php-uwuify
- Owner: codemasher
- License: mit
- Fork: true (nemorize/php-uwuify)
- Created: 2023-02-03T23:46:22.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-05T23:09:42.000Z (over 3 years ago)
- Last Synced: 2024-11-11T20:33:03.085Z (over 1 year ago)
- Language: PHP
- Size: 18.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# uwuify-php
Uwuify any sentence or word with various options.
## Installation
```bash
composer require nemo9l/uwuify
composer install
```
## Usage
### Basic usage
```php
$uwuifier = new Nemo9l\Uwuify\Uwuify();
$result = $uwuifier->uwuify('Uwuify any sentence or word with various options.');
```
### Advanced usage
```php
// (float $regexModifier = null, float $exclamationModifier = null, array $spaceModifier = [])
$uwuifier = new Nemo9l\Uwuify\Uwuify(0.75, 0.75, [ 'faces' => 0.025, 'actions' => 0.025, 'stutter' => 0.05 ]);
$result = $uwuifier->uwuify('Uwuify any sentence or word with various options.');
```
#### $regexModifier
`$regexModifier` property affects what percentage of regex(defined at `static $_regexMaps`) replacements will be applied to the sentence.
Default value is `1.0` which means 100% of regex replacements will be applied.
#### $exclamationModifier
`$exclamationModifier` property affects what percentage of exclamation marks(defined at `static $_exclamations`) will be replaced.
#### $spaceModifier
`$spaceModifier` property affects what percentage of spaces will be replaced with various options.
It can be an array with following keys:
- `faces` - affects what percentage of spaces will be replaced with faces(defined at `static $_faces`).
- `actions` - affects what percentage of spaces will be replaced with actions(defined at `static $_actions`).
- `stutter` - affects what percentage of spaces will have some appends to make it stutter.
### License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details